komorebi icon indicating copy to clipboard operation
komorebi copied to clipboard

Cannot close a focused floating window.

Open Keshav13142 opened this issue 1 year ago • 3 comments

Describe the bug If I try to close a floating window using the wkhd shortcut I assigned to komorebic close, the window behind it gets closed even though the focus it on the floating window

To Reproduce Steps to reproduce the behavior:

  1. Have any open window that is managed by komorebi
  2. Open a new floating window (in my case that it everything search)
  3. Try to close the floating window using komorebic close
  4. The window behind gets closed (the bug)

Expected behavior Close the floating window instead of the one behind it.

Screenshots and Videos video

Operating System OS Name: Microsoft Windows 10 Home Single Language OS Version: 10.0.19045 N/A Build 19045

komorebic check Output image

Additional context I'm also unable to close the floating window even though that is the only open window that is focused in that workspace.

NOTE: I have not applied any window or workspace rules to everything search (the floating window).

The following are my configs

Keshav13142 avatar Aug 01 '23 08:08 Keshav13142

komorebic commands generally only operate on applications managed by the window manager, and Everything fails the window management validity test (since it's not a windowed application) meaning it gets ignored, therefore this is not a bug but the intended behaviour, because komorebi should only be able to operate on windows it manages.

I'd be open to a accepting PR if somebody felt strongly enough about this to add an additional command like close-any-window which explicitly documents that the command can operate on windows not managed by komorebi.

LGUG2Z avatar Aug 01 '23 17:08 LGUG2Z

komorebic commands generally only operate on applications managed by the window manager, and Everything fails the window management validity test (since it's not a windowed application) meaning it gets ignored, therefore this is not a bug but the intended behaviour, because komorebi should only be able to operate on windows it manages.

I'd be open to a accepting PR if somebody felt strongly enough about this to add an additional command like close-any-window which explicitly documents that the command can operate on windows not managed by komorebi.

Oh okay, makes sense!. I misunderstood that Everything was a floating window managed by Komorebi. I didn't know that it failed the validity test. And yes, close-any-window sounds like a good feature, however I'm also not sure how many people have encountered this problem. Thanks for the response.

Keshav13142 avatar Aug 07 '23 00:08 Keshav13142

For anyone looking for a workaround, it's pretty straightforward to set up hotkeys that work for all windows (tiled, floating, full screen, monocle, or unmanaged) using AHK:

!x:: WinMinimize, A  ; Alt + x minimizes the active window 
!q:: WinClose, A     ; Alt + q closes the active window

urob avatar Nov 30 '23 01:11 urob