bakkeby / dusk

Just another fork of dwm
MIT License
159 stars 22 forks source link

When on WS1 and MOD1 moves to another WS, the resultant WS looses it's apps in the top panel #12

Closed andbenn closed 2 years ago

andbenn commented 2 years ago

Watch the top panel / bar, in particular the apps between the tag indicator and the blocks (if any are set) in these.

Put a couple windows on WS1, WS2, and maybe WS3. Move mouse onto the top panel and/or a corner.

Go to WS1 via MOD-1. Go to WS2 via MOD-2. MOD-1, MOD-1 again. You should be on WS2

The middle of the top panel is dark. Yet the workspace has clients on it.

Give a window on WS2 focus. Now MOD-2 (back to WS1), MOD-2 (back to WS2) and the top panel is as expected.

It seems that when WS1 is front, and MOD-1 occurs, whatever was the previous to WS1 workspace that is moved to doesn't get an event or a paint of the clients on that workspace. Doing this with any other workspace combo seems to work as expected. I only hit this when leaving WS1 and using MOD1.

bakkeby commented 2 years ago

Thanks for the clear instructions on how to reproduce this issue, much appreciated.

The underlying issue was that when the mouse rests on the top panel or a corner the previous workspace was brought into view, but the monitor would be left with no selected workspace.

The side effects of this is that:

This does not happen when the mouse cursor is otherwise on the screen as the window that ends up under the cursor will receive focus when toggling back to the previous workspace.

I have pushed a fix that sets the selected workspace for the monitor when toggling back to the previous workspace this way.

Thanks again for reporting.

andbenn commented 2 years ago

Merged, built, restarted. Looks good! I will admit this was absolutely trivial. Thank you for this fantastic window manager!