Hi people,

the attached patch fixes a bug I've been encountering in the magnifier layout
which was that after commit #2a2166d8569 the focused client wasn't centered if
it wasn't the first client in the clients table.

-- 
GCS/IT/M d- s+:- a--- C++ UL+++ US UB++ P+++ L+++ E--- W+ N+ o--
K- w--- O M-- V PS+ PE- Y+ PGP+++ t+ 5 X+ R tv+ b++ DI+++ D+++ G+
e- h! r y+

    Gregor Best
From dab591c4b74338f023cefffb7c1b7d8ca3dd2630 Mon Sep 17 00:00:00 2001
From: Gregor Best <[email protected]>
Date: Fri, 13 Mar 2009 22:23:35 +0100
Subject: [PATCH] layouts/magnifier: fix position of focused screen

Signed-off-by: Gregor Best <[email protected]>
---
 lib/awful/layout/init.lua.in           |    1 +
 lib/awful/layout/suit/magnifier.lua.in |    3 ++-
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/lib/awful/layout/init.lua.in b/lib/awful/layout/init.lua.in
index 2a0fdf0..43077de 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 9b76448..5fe82e3 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]
-- 
1.6.2

Attachment: signature.asc
Description: PGP signature

Reply via email to