magnifier: Focus on the parent if a non-tiled window has a transient_for.

Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Maarten Maathuis 2008-11-02 21:51:09 +01:00 committed by Julien Danjou
parent 8d4c9b5962
commit 0df0077a2b
1 changed files with 4 additions and 0 deletions

View File

@ -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);