1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-21 21:38:00 +01:00

wmaker: fix stacking order of dock and fullscreen

This reverts the commits:
 311ab6b08c ("Raise fullscreened window")
 a504370f3b ("Remove WMFullscreenLevel")

Removing WMFullscreenLevel had the side effect that a dock or panel
having the _NET_WM_WINDOW_TYPE_DOCK type would stack on top of
fullscreen windows, obscuring part of them.  This is unwanted. No
other window should cover a focused fullscreen window:.
https://specifications.freedesktop.org/wm-spec/latest/ar01s09.html#STACKINGORDER

Simply raising the fullscreen window to the top of the stack of normal
windows is not sufficient if there are windows with higher stacking
levels present.  The separate WMFullscreenLevel is needed.

Cc: Amadeusz Sławiński <amade@asmblr.net>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
This commit is contained in:
Bjørn Mork
2016-07-12 23:49:46 +02:00
committed by Carlos R. Mafra
parent b7a1528833
commit 6429847494
3 changed files with 12 additions and 7 deletions

View File

@@ -59,6 +59,7 @@ enum {
WMSubmenuLevel = 15, WMSubmenuLevel = 15,
WMMainMenuLevel = 20, WMMainMenuLevel = 20,
WMStatusLevel = 21, WMStatusLevel = 21,
WMFullscreenLevel = 50,
WMModalLevel = 100, WMModalLevel = 100,
WMPopUpLevel = 101, WMPopUpLevel = 101,
WMScreensaverLevel = 1000, WMScreensaverLevel = 1000,

View File

@@ -727,8 +727,7 @@ void wFullscreenWindow(WWindow *wwin)
wWindowConfigureBorders(wwin); wWindowConfigureBorders(wwin);
ChangeStackingLevel(wwin->frame->core, WMNormalLevel); ChangeStackingLevel(wwin->frame->core, WMFullscreenLevel);
wRaiseFrame(wwin->frame->core);
wwin->bfs_geometry.x = wwin->frame_x; wwin->bfs_geometry.x = wwin->frame_x;
wwin->bfs_geometry.y = wwin->frame_y; wwin->bfs_geometry.y = wwin->frame_y;
@@ -752,10 +751,15 @@ void wUnfullscreenWindow(WWindow *wwin)
wwin->flags.fullscreen = False; wwin->flags.fullscreen = False;
if (WFLAGP(wwin, sunken)) if (wwin->frame->core->stacking->window_level == WMFullscreenLevel) {
ChangeStackingLevel(wwin->frame->core, WMSunkenLevel); if (WFLAGP(wwin, sunken)) {
else if (WFLAGP(wwin, floating)) ChangeStackingLevel(wwin->frame->core, WMSunkenLevel);
ChangeStackingLevel(wwin->frame->core, WMFloatingLevel); } else if (WFLAGP(wwin, floating)) {
ChangeStackingLevel(wwin->frame->core, WMFloatingLevel);
} else {
ChangeStackingLevel(wwin->frame->core, WMNormalLevel);
}
}
wWindowConfigure(wwin, wwin->bfs_geometry.x, wwin->bfs_geometry.y, wWindowConfigure(wwin, wwin->bfs_geometry.x, wwin->bfs_geometry.y,
wwin->bfs_geometry.width, wwin->bfs_geometry.height); wwin->bfs_geometry.width, wwin->bfs_geometry.height);

View File

@@ -1057,7 +1057,7 @@ static int getWindowLayer(WWindow *wwin)
if (wwin->transient_for) { if (wwin->transient_for) {
WWindow *parent = wWindowFor(wwin->transient_for); WWindow *parent = wWindowFor(wwin->transient_for);
if (parent && parent->flags.fullscreen) if (parent && parent->flags.fullscreen)
layer = WMNormalLevel; layer = WMFullscreenLevel;
} }
/* //layer = WMPopUpLevel; // this seems a bad idea -Dan */ /* //layer = WMPopUpLevel; // this seems a bad idea -Dan */
} else if (wwin->type == net_wm_window_type_dropdown_menu) { } else if (wwin->type == net_wm_window_type_dropdown_menu) {