magnifier: try harder to find parent of dialog
Signed-off-by: Maarten Maathuis <madman2003@gmail.com> Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
45f2b79a98
commit
76b511375a
|
@ -41,9 +41,11 @@ layout_magnifier(int screen)
|
||||||
|
|
||||||
focus = globalconf.screens[screen].client_focus;
|
focus = globalconf.screens[screen].client_focus;
|
||||||
|
|
||||||
/* When the client is not tiled and it has a parent, focus on that parent. */
|
/* Find parent of this window, if it has one. */
|
||||||
if (!IS_TILED(focus, screen) && focus && focus->transient_for)
|
if (!IS_TILED(focus, screen) && focus && focus->transient_for)
|
||||||
|
do {
|
||||||
focus = focus->transient_for;
|
focus = focus->transient_for;
|
||||||
|
} while (focus->transient_for != NULL);
|
||||||
|
|
||||||
/* If focused window is not tiled, take the first one which is tiled. */
|
/* If focused window is not tiled, take the first one which is tiled. */
|
||||||
if(!IS_TILED(focus, screen))
|
if(!IS_TILED(focus, screen))
|
||||||
|
|
Loading…
Reference in New Issue