On 12/06/2008 11:45 PM, Maarten Maathuis wrote:
On 12/06/2008 01:15 AM, Maarten Maathuis wrote:
Number 3 is the least intrusive way to handle maximized windows in a decent way. Works pretty well, except for ooimpress (which was my test case/annoyance) which insists in some cases on moving the window one pixel down after requesting maximize (i've found no indication awesome is doing this, nor does forcing all the apps to maximize on manage reveal any other cases), which messes with sloppy focus (one pixel of tiled window is exposed then). But with openoffice's track record that is not surprising i suppose.

Maarten.


Two more patches, one to avoid taskbars keeping their original size when struts change, the other to resize the taskbar when clients with struts are (un)banned.

Maarten.

And two more, to make the magnifier layout useful.

Maarten.
>From 18fd8b579a7c285e5ec560cf101868e38e3ec1dc Mon Sep 17 00:00:00 2001
From: Maarten Maathuis <[EMAIL PROTECTED]>
Date: Sat, 6 Dec 2008 23:51:53 +0100
Subject: [PATCH] magnifier: Abort when focus is nil.

Signed-off-by: Maarten Maathuis <[EMAIL PROTECTED]>
---
 lib/awful/layout/suit/magnifier.lua.in |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/lib/awful/layout/suit/magnifier.lua.in 
b/lib/awful/layout/suit/magnifier.lua.in
index 4f9d80f..f1fddbd 100644
--- a/lib/awful/layout/suit/magnifier.lua.in
+++ b/lib/awful/layout/suit/magnifier.lua.in
@@ -31,6 +31,11 @@ local function magnifier(_, screen)
         focus = cls[1]
     end
 
+    -- Abort if no clients are present
+    if not focus then
+        return
+    end
+
     -- Find parent of this window, if it has one.
     while focus.transient_for do
         focus = focus.transient_for
-- 
1.6.0.4

>From 5bc289d8228751e07002ffdd207f0ca1fc5fb8d9 Mon Sep 17 00:00:00 2001
From: Maarten Maathuis <[EMAIL PROTECTED]>
Date: Sat, 6 Dec 2008 23:57:46 +0100
Subject: [PATCH] magnifier: Only tile tiled clients.

Signed-off-by: Maarten Maathuis <[EMAIL PROTECTED]>
---
 lib/awful/layout/suit/magnifier.lua.in |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/lib/awful/layout/suit/magnifier.lua.in 
b/lib/awful/layout/suit/magnifier.lua.in
index f1fddbd..aa1fe05 100644
--- a/lib/awful/layout/suit/magnifier.lua.in
+++ b/lib/awful/layout/suit/magnifier.lua.in
@@ -22,7 +22,7 @@ module("awful.layout.suit.magnifier")
 local function magnifier(_, screen)
     -- Fullscreen?
     local area = capi.screen[screen].workarea
-    local cls = client.visible(screen)
+    local cls = client.tiled(screen)
     local focus = capi.client.focus
     local t = tag.selected()
     local mwfact = tag.getmwfact(t)
@@ -43,12 +43,7 @@ local function magnifier(_, screen)
 
     -- If focused window is not tiled, take the first one which is tiled.
     if client.floating.get(focus) then
-        for k, c in ipairs(cls) do
-            if not client.floating.get(c) then
-                focus = c
-                break
-            end
-        end
+        focus = cls[1]
     end
 
     local geometry = {}
-- 
1.6.0.4

Reply via email to