ch11ng / exwm

Emacs X Window Manager
2.85k stars 136 forks source link

EXWM does not respect EWMH recommended stacking order when switching workspaces #855

Open toshokan opened 2 years ago

toshokan commented 2 years ago

The EWMH specification recommends the following stacking order (last stacked highest):

I have a panel (occupying the top 16 pixels of my display) with the following X window properties:

WM_CLASS(STRING) = "bergamot", "bergamot"
_NET_WM_STRUT_PARTIAL(CARDINAL) = 0, 0, 16, 0, 0, 0, 0, 0, 0, 1366, 0, 0
_NET_WM_STATE(ATOM) = _NET_WM_STATE_BELOW
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DOCK

If the application displaying this window is running and an EXWM-managed window goes fullscreen, that window is correctly stacked above the panel.

If I switch workspace away from the one with the fullscreen window and then back to it, the panel is now incorrectly stacked above the fullscreen application (leaving fullscreen and going fullscreen again re-stacks correctly)

daviwil commented 2 years ago

I've also been experiencing this issue, it requires me to kill my panel app when using another app full screen.

medranocalvo commented 2 years ago

Thank you for the detailed report.

This is a bug: the _NET_WM_TYPE_DOCK should maintain its stacking order after the fullscreen.

I could only have a quick look at this. The issue is around https://github.com/ch11ng/exwm/blob/571ca227e7857b5fd95f4f3211d471083d69ec32/exwm-layout.el#L133; we should probably invoke exwm-layout-set-fullscreen (which should be refactored) instead of just setting the geometry.

toshokan commented 2 years ago

@medranocalvo thanks for pointing me in that direction!

I did a quick test to see if calling exwm-layout-set-fullscreen in that body is sufficient to set the stacking order correctly and unfortunately it isn't, but it gives me an area to focus on while I keep investigating :)