bakkeby / dwm-flexipatch

A dwm build with preprocessor directives to decide which patches to include during build time
MIT License
1.15k stars 235 forks source link

Intrusive tag preview showing when swapping tags #415

Closed Zerogaku closed 6 months ago

Zerogaku commented 6 months ago

This issue occurs only when you switch to a tag by clicking on it with the mouse, and if the tag you switch to happens to have a fullscreen app active. It appears that the preview is getting concealed behind the fullscreen application, thereby not being given a chance to hide itself when the mouse moves. Consequently, when you switch to another tag, the previous tag's preview persists. Although it eventually disappears when moving the mouse cursor, it can be somewhat disruptive to have to continuously do so.

It might help to have a modification that makes it so that the preview instantly disappears after the tag is swapped to, as the preview of the swapped tag will persist unless moving the mouse cursor.

https://github.com/bakkeby/dwm-flexipatch/assets/144664603/745c03d4-6894-4902-a629-3da34fc8415b

bakkeby commented 6 months ago

I think that should cover it. Of course you can still reproduce this issue if you were to hover the tag that has the fullscreen window and then use the keybindings to change the view to that tag.

Zerogaku commented 6 months ago

Thanks! The issue being reproducible doesn't seem like that much of an issue considering how specific the condition is, hopefully 😅.

And is it possible to remove the preview of the tag from within the preview? image

This might not work logically since I'm assuming the patch does a screenshot of sorts, so it might require taking the screenshot before the preview ever appears, it also appears to update the preview, It might update the preview after switching tags, so that would require taking the "screenshot" with the tag preview disabled before the tag is swapped, I could be completely wrong on the logic here.

bakkeby commented 6 months ago

That would be one of the limitations of this patch. The preview window is just a window so it should in principle just be a matter of moving the window away or unmapping it, but so far I haven't found a viable solution.

I have tried both moving the window and unmapping it, also in combination of waiting a second or so with no positive effect.

The window manager is processing an event coming from the X server and we are sending new events to the X server to move or unmap the window. When I looked at it I got the impression that we'd need to finish processing the buttom press event before the window would go away (which obviously has implications).

Zerogaku commented 6 months ago

Ah I see well it's no problem I don't mind it that much since in practice it will only show the preview within the preview window if I click on a tag to swap to and click back on the previous tag I was on, which in that case super + tab is really practical.

Thank for the help!