komorebi
komorebi copied to clipboard
[BUG]: Focus issue when switching workspaces
Describe the bug Hi!
Using Unreal Engine and having a blueprint window (this could be considered as a popup window?) opened (the engine and the blue print window side by side), I am currently having issue switching workspaces. When I do, Komorebi tries to switch to the wanted one, but then immediately switch back to the current one. It will only work if I minimize/close the blueprint window.
I tried to add a float rule to the blueprint window, but unfortunately it has the same "class" (UnrealWindow) and "exe"(UnrealEditor.exe) names as the Editor itself. Only the "title" fields are different, but they are also specific to the project/assets being opened (it could work if the float rules supports regex expression I guess?) . The "hwnd" fields are not the same, but I think we cannot target by this field right?
Maybe I missed a configuration that could resolve this behaviour?
Great work by the way with this tiling window manager!
To Reproduce Steps to reproduce the behavior:
- Open Unreal engine (or possibly (not tested) any kind of app?)
- Open a blueprint window (or possibly (not tested) open another (popup?) window inside of an app? )
- Switch workspace
- Bug happen
Expected behavior We should be able to switch workspaces even when multiple windows from the same application are opened.
Operating System
OS Name: Microsoft Windows 11 Pro
OS Version: 10.0.22000 N/A Build 22000
Thank you for the bug report! I will take a bit of time to install UE and figure out the software as I'm not very familiar with it.
In the meantime, when floating titles, it's possible to try and match on a prefix or a suffix string; it's not quite as powerful as full regex expressions, but it may be possible to target those blueprint windows if they share common prefixes or suffixes in their titles.
I have installed Unreal Engine and I have been able to reproduce this with a popup window.
I think I have an idea what may be causing this issue; when minimizing the "main" UE window, any popup windows are also automatically minimized as well. This is a very non-standard behaviour on Windows (child/popup windows should not be minimized when the parent window is) which will take some custom handling in komorebi
to deal with gracefully. I will start brainstorming some possibles ways to handle this. 🤔
@Lap1n there is a temporary fix available in the commit referenced above that I have tested myself. Hopefully I will be able to design a nicer way to keep this in user configuration instead of hard-coded in the process so that it can be used for other applications that may be found to behave like this in the future.
@Lap1n Check out this commit, just set window-hiding-behaviour
to cloak
: https://github.com/LGUG2Z/komorebi/commit/80c98596dd2cb4e28666e49c753ffc7e5137e09e