From 0df0077a2b5b3efc714876bf87b7f956e324f75c Mon Sep 17 00:00:00 2001 From: Maarten Maathuis Date: Sun, 2 Nov 2008 21:51:09 +0100 Subject: [PATCH] magnifier: Focus on the parent if a non-tiled window has a transient_for. Signed-off-by: Maarten Maathuis Signed-off-by: Julien Danjou --- layouts/magnifier.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/layouts/magnifier.c b/layouts/magnifier.c index 7b5472da9..3a910e9b9 100644 --- a/layouts/magnifier.c +++ b/layouts/magnifier.c @@ -41,6 +41,10 @@ layout_magnifier(int screen) focus = globalconf.screens[screen].client_focus; + /* When the client is not tiled and it has a parent, focus on that parent. */ + if (!IS_TILED(focus, screen) && focus && focus->transient_for) + focus = focus->transient_for; + /* If focused window is not tiled, take the first one which is tiled. */ if(!IS_TILED(focus, screen)) for(focus = globalconf.clients; focus && !IS_TILED(focus, screen); focus = focus->next);