[PATCH 2/2] wmaker: allow alt+tabbed windows over fullscreen

Bjørn Mork <[email protected]>
Newsgroups gmane.compw.window-managers.windowmaker.devel
Message-ID <[email protected]>
Fullscreen windows should only be on top when they are in focus. Change
the stacking level temporarily back to WMNormalLevel if the fullscreen
window loses focus due to an alt+tab operation.

Change the stacking level back to WMFullscreenLevel if the fullscreen
window receives the focus again.

Cc: Amadeusz Sławiński <[email protected]>
Signed-off-by: Bjørn Mork <[email protected]>
---
 src/actions.c | 4 ++++
 src/cycling.c | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/src/actions.c b/src/actions.c
index 63f9f36457ca..bae060183fd1 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -216,6 +216,10 @@ void wSetFocusTo(WScreen *scr, WWindow *wwin)
 			if (wPreferences.highlight_active_app)
 				wApplicationDeactivate(oapp);
 		}
+
+		/* reset fullscreen if temporarily removed due to lost focus*/
+		if (wwin->flags.fullscreen)
+			ChangeStackingLevel(wwin->frame->core, WMFullscreenLevel);
 	}
 
 	wWindowFocus(wwin, focused);
diff --git a/src/cycling.c b/src/cycling.c
index 916d9477804b..94b918326296 100644
--- a/src/cycling.c
+++ b/src/cycling.c
@@ -62,6 +62,10 @@ static WWindow *change_focus_and_raise(WWindow *newFocused, WWindow *oldFocused,
 	if (!newFocused)
 		return oldFocused;
 
+	/* allow the focused window to float on top of a fullscreen window */
+	if (oldFocused->flags.fullscreen)
+		ChangeStackingLevel(oldFocused->frame->core, WMNormalLevel);
+
 	wWindowFocus(newFocused, oldFocused);
 	oldFocused = newFocused;
 
-- 
2.8.1


-- 
To unsubscribe, send mail to [email protected].
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.