> The patch fixing that problem should not touch the call to
> with_current(), or make awful requires definitively awful.rules. But I
> guess that if you do that, people using other rules system such as
> shifty will start crying, because last time I heard about it, shifty was
> explicitely unregistering withcurrent().

zomg, i've been experiencing flickering in my (shifty based) config
for ages now and couldnt be bothered to check.
shifty unregisters withcurrent in manage signal which doesnt do
anything since the function that's registered is an unnamed, inline
function that calls withcurrrent.

- i've hacked awful.tag with the attached patch (sorry I couldnt think
of a better name for that function)
- unregistered the function in shifty: client.remove_signal("manage",
awful.tag.scrtag_client)
- and no more flicker \o/

however a patch for awful.rules would have to also deal with screen setting.

alternatively awful.tag patch could split the screen-setting function
out into something public, remove withcurrent call from it and
register withcurrent and the screensetting functions separately with
manage signal (not sure if that's cool in terms of concurrency).

k
From 0547db73f978432d4d31b4fa2f263008a492bc6a Mon Sep 17 00:00:00 2001
From: koniu <[email protected]>
Date: Tue, 22 Dec 2009 13:02:29 +0000
Subject: [PATCH] awful.tag: allow unregistering of withcurrent

Signed-off-by: koniu <[email protected]>
---
 lib/awful/tag.lua.in |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/lib/awful/tag.lua.in b/lib/awful/tag.lua.in
index 949a83d..cd368a1 100644
--- a/lib/awful/tag.lua.in
+++ b/lib/awful/tag.lua.in
@@ -356,8 +356,8 @@ function attached_add_signal(screen, ...)
     end
 end
 
--- Register standards signals
-capi.client.add_signal("manage", function(c, startup)
+--- Sets correct screen and tags a client.
+function scrtag_client(c, startup)
     -- If we are not managing this application at startup,
     -- move it to the screen where the mouse is.
     -- We only do it for "normal" windows (i.e. no dock, etc).
@@ -376,7 +376,10 @@ capi.client.add_signal("manage", function(c, startup)
     end
     withcurrent(c, startup)
     c:add_signal("property::screen", withcurrent)
-end)
+end
+
+-- Register standards signals
+capi.client.add_signal("manage", scrtag_client)
 
 for s = 1, capi.screen.count() do
     capi.screen[s]:add_signal("tag::history::update", history.update)
-- 
1.6.5.7

Reply via email to