From 2d816fd80c8a6a316fac9dd8e643124ffb03fd93 Mon Sep 17 00:00:00 2001 From: Gregor Best Date: Fri, 13 Mar 2009 22:23:35 +0100 Subject: [PATCH] awful.layout.suit.magnifier: fix position of focused screen Signed-off-by: Gregor Best Signed-off-by: Julien Danjou --- lib/awful/layout/init.lua.in | 1 + lib/awful/layout/suit/magnifier.lua.in | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/awful/layout/init.lua.in b/lib/awful/layout/init.lua.in index 2a0fdf0fb..43077de83 100644 --- a/lib/awful/layout/init.lua.in +++ b/lib/awful/layout/init.lua.in @@ -69,6 +69,7 @@ local function on_arrange (screen) p.nmaster = tag.getnmaster(t) p.mwfact = tag.getmwfact(t) p.tagdata = tag.getdata(t) + p.screen = screen get(screen).arrange(p) end diff --git a/lib/awful/layout/suit/magnifier.lua.in b/lib/awful/layout/suit/magnifier.lua.in index 9b76448bb..5fe82e3ec 100644 --- a/lib/awful/layout/suit/magnifier.lua.in +++ b/lib/awful/layout/suit/magnifier.lua.in @@ -24,9 +24,10 @@ function arrange(p) local cls = p.clients local focus = capi.client.focus local mwfact = p.mwfact + local fidx -- Check that the focused window is on the right screen - if focus and focus.screen ~= screen then focus = nil end + if focus and focus.screen ~= p.screen then focus = nil end if not focus and #cls > 0 then focus = cls[1]