Cannot close a focused floating window. #233

Closed
opened 2026-01-05 14:49:10 +01:00 by adam · 3 comments
Owner

Originally created by @Keshav13142 on GitHub (Aug 1, 2023).

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

Originally created by @Keshav13142 on GitHub (Aug 1, 2023). **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](https://github.com/LGUG2Z/komorebi/assets/55992029/3e186112-4a7e-4e6c-a29b-dc4f8c26792f) **Operating System** OS Name: Microsoft Windows 10 Home Single Language OS Version: 10.0.19045 N/A Build 19045 **`komorebic check` Output** ![image](https://github.com/LGUG2Z/komorebi/assets/55992029/5a41cc7e-c790-438c-9e8d-8d98b2d1de57) **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 - [komorebi ](https://github.com/Keshav13142/.dotfiles-windows/blob/main/komorebi/.config/komorebi/komorebi.json) - [wkhd ](https://github.com/Keshav13142/.dotfiles-windows/blob/main/whkd/.config/whkdrc)
adam added the bug label 2026-01-05 14:49:10 +01:00
adam closed this issue 2026-01-05 14:49:10 +01:00
Author
Owner

@LGUG2Z commented on GitHub (Aug 1, 2023):

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 commented on GitHub (Aug 1, 2023): `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`.
Author
Owner

@Keshav13142 commented on GitHub (Aug 7, 2023):

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 commented on GitHub (Aug 7, 2023): > `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.
Author
Owner

@urob commented on GitHub (Nov 30, 2023):

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 commented on GitHub (Nov 30, 2023): 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: ```autohotkey !x:: WinMinimize, A ; Alt + x minimizes the active window !q:: WinClose, A ; Alt + q closes the active window ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/komorebi#233