[BUG]: Cloaked windows not restoring on stop/restore-windows #438

Closed
opened 2026-01-05 14:50:44 +01:00 by adam · 5 comments
Owner

Originally created by @Cynosphere on GitHub (Jul 26, 2024).

Describe the bug
Cloaked windows not restoring on stop/restore-windows until manually clicked on/alt-tabbed to.

Is it always force-quitting when stopping? When running stop it always outputs:

komorebi is still running, attempting to force-quit

Stop-Process -Name:komorebi -ErrorAction SilentlyContinue

Or is this a purely visual issue?

To Reproduce
Steps to reproduce the behavior:

  1. Open a couple windows
  2. Move some to another workspace
  3. Run komorebic stop
  4. Observe that the windows from the other workspace(s) did not appear
  5. Run komorebic restore-windows and observe nothing changing still

Expected behavior
The cloaked windows restore themselves

Operating System

OS Name:                   Microsoft Windows 10 Home
OS Version:                10.0.19045 N/A Build 19045

komorebic check Output

No KOMOREBI_CONFIG_HOME detected, defaulting to C:\Users\User

Looking for configuration files in C:\Users\User

Found komorebi.json; this file can be passed to the start command with the --config flag

Found C:\Users\User\.config\whkdrc; key bindings will be loaded from here when whkd is started, and you can start it automatically using the --whkd flag

Additional context
komorebi is running as and being started/stopped as administrator

Originally created by @Cynosphere on GitHub (Jul 26, 2024). **Describe the bug** Cloaked windows not restoring on `stop`/`restore-windows` until manually clicked on/alt-tabbed to. Is it always force-quitting when stopping? When running `stop` it always outputs: ``` komorebi is still running, attempting to force-quit Stop-Process -Name:komorebi -ErrorAction SilentlyContinue ``` Or is this a purely visual issue? **To Reproduce** Steps to reproduce the behavior: 1. Open a couple windows 2. Move some to another workspace 3. Run `komorebic stop` 4. Observe that the windows from the other workspace(s) did not appear 5. Run `komorebic restore-windows` and observe nothing changing still **Expected behavior** The cloaked windows restore themselves **Operating System** ``` OS Name: Microsoft Windows 10 Home OS Version: 10.0.19045 N/A Build 19045 ``` **`komorebic check` Output** ``` No KOMOREBI_CONFIG_HOME detected, defaulting to C:\Users\User Looking for configuration files in C:\Users\User Found komorebi.json; this file can be passed to the start command with the --config flag Found C:\Users\User\.config\whkdrc; key bindings will be loaded from here when whkd is started, and you can start it automatically using the --whkd flag ``` **Additional context** komorebi is running as and being started/stopped as administrator
adam added the bug label 2026-01-05 14:50:44 +01:00
adam closed this issue 2026-01-05 14:50:44 +01:00
Author
Owner

@LGUG2Z commented on GitHub (Jul 26, 2024):

It's possible that this is because the hidden SetCloak function is not compatible with with the build of Windows you are running. Some more info should be available if you run komorebic log in a separate terminal tab while trying to reproduce this.

@LGUG2Z commented on GitHub (Jul 26, 2024): It's possible that this is because the hidden `SetCloak` function is not compatible with with the build of Windows you are running. Some more info should be available if you run `komorebic log` in a separate terminal tab while trying to reproduce this.
Author
Owner

@Cynosphere commented on GitHub (Jul 26, 2024):

It's possible that this is because the hidden SetCloak function is not compatible with with the build of Windows you are running.

Cloaking works fine when switching workspaces, its only when stopping that it fails.

Some more info should be available if you run komorebic log in a separate terminal tab while trying to reproduce this.

2024-07-26T19:06:37.951793Z  INFO process_command{Stop}: komorebi::process_command: received stop command, restoring all hidden windows and terminating process
2024-07-26T19:06:37.952096Z  INFO process_command{Stop}:restore_all_windows: komorebi::window_manager: restoring all hidden windows
2024-07-26T19:06:37.952599Z ERROR komorebi::process_command: The parameter is incorrect. (0x80070057)

komorebic restore-windows gives no output to the log.

@Cynosphere commented on GitHub (Jul 26, 2024): > It's possible that this is because the hidden `SetCloak` function is not compatible with with the build of Windows you are running. Cloaking works fine when switching workspaces, its only when stopping that it fails. > Some more info should be available if you run `komorebic log` in a separate terminal tab while trying to reproduce this. ``` 2024-07-26T19:06:37.951793Z INFO process_command{Stop}: komorebi::process_command: received stop command, restoring all hidden windows and terminating process 2024-07-26T19:06:37.952096Z INFO process_command{Stop}:restore_all_windows: komorebi::window_manager: restoring all hidden windows 2024-07-26T19:06:37.952599Z ERROR komorebi::process_command: The parameter is incorrect. (0x80070057) ``` `komorebic restore-windows` gives no output to the log.
Author
Owner

@LGUG2Z commented on GitHub (Jul 27, 2024):

Relevant blobs:

c367967301/komorebi/src/process_command.rs (L768-L779)

It's possible that since cloak is working when switching workspaces, you may be getting a failure when remove_accent is called, because operating on accents is only supported on Windows 11+

c367967301/komorebi/src/window_manager.rs (L951-L978)

If you're able to build from source, can you try commenting out that line and recompiling?

@LGUG2Z commented on GitHub (Jul 27, 2024): Relevant blobs: https://github.com/LGUG2Z/komorebi/blob/c3679673012f8ca49db945ae2df4847e79eebd6c/komorebi/src/process_command.rs#L768-L779 It's possible that since cloak is working when switching workspaces, you may be getting a failure when `remove_accent` is called, because operating on accents is only supported on Windows 11+ https://github.com/LGUG2Z/komorebi/blob/c3679673012f8ca49db945ae2df4847e79eebd6c/komorebi/src/window_manager.rs#L951-L978 If you're able to build from source, can you try commenting out that line and recompiling?
Author
Owner

@Cynosphere commented on GitHub (Jul 27, 2024):

Works as intended with that commented out.

@Cynosphere commented on GitHub (Jul 27, 2024): Works as intended with that commented out.
Author
Owner

@LGUG2Z commented on GitHub (Jul 27, 2024):

Fix is referenced above, will be in the next nightly released to WinGet over the weekend 🎉

@LGUG2Z commented on GitHub (Jul 27, 2024): Fix is referenced above, will be in the next nightly released to WinGet over the weekend 🎉
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/komorebi#438