Vitor Eiji Justus Sakaguti <vitoreiji0 <at> gmail.com> writes:
>
> Hi,
> I recently switched from xcompmgr to cairo-compmgr but I'm having an
> annoying issue with it. Whenever I switch focus I expect the new
> focused client to be raised as well, and this was the case with
> xcompmgr. With cairo-compmgr, the newly focused client *sometimes* is
> not raised, and I still don't have a clue as to when it does and when
> it doesn't.
>
> So is this really a bug in cairo-compmgr or do I have to put
> additional stuff in my rc.lua?
>
> vitor <at> agilaz:~> awesome -v
> awesome v3.4.9 (Smack)
> • Build: Jan 18 2011 11:30:02 for x86_64 by gcc version 4.5.2 (vitor <at>
agilaz)
> • D-Bus support: ✔
>
> And cairo-compmgr is 0.3.0 (git20110320)
>
> (Running up-to-date Arch Linux if that matters...)
>
>
Huh... Five years...
Anyway, fixed it by accident. Was looking at problems with Java on older AWM
implementations. Focus problems are fixed by using:
function delay_raise ()
-- 5 ms ages in computer time, but I won't notice it.
local raise_timer = timer { timeout = 0.005 }
raise_timer:connect_signal("timeout",
function()
if client.focus then
client.focus:raise()
end
raise_timer:stop()
end)
raise_timer:start()
end
Hook it like this:
-- Default client focus
awful.key({ modkey }, "k",
function ()
awful.client.focus.byidx(1)
delay_raise()
end),
awful.key({ modkey }, "j",
function ()
awful.client.focus.byidx(-1)
delay_raise()
end),