On Thu, Oct 22, 2009 at 09:37:19AM -0700, Marc Petit-Huguenin wrote:
> Hi,
> 
> What is the equivalent of awful.hooks.arrange.register(function (screen) in
> Awesome 3.4?  In 3.3 I added the following line to this hook, but now I do not
> know how where to put it:
> 
> client.focus = awful.mouse.client_under_pointer()
> 
> Thanks for your help.

I concur with that question, because I used to do this in my arrange
hook:


-- Hook function to execute when arranging the screen
-- (tag switch, new client, etc)

local function warp_mouse(c)
    local o = mouse.client_under_pointer()
    if not o or o ~= c then
        local g = c:geometry()

        mouse.coords { x = g.x + 5, y = g.y + 5 }
    end
end

client.add_signal("arrange", function (screen)
    warp_mouse(client.focus)
end)

This was perfect and forced the mouse inside the window of newly created
clients, or when changing the focus to a new client *AFTER* all the
resizes had been done.

There is absolutely no sane way to do that right now unless I'm
mistaken. I tried to do it in the "focus" hook, but it can trigger 100%
CPUs when creating a new client, probably because moving the mouse can
stupidly trigger a race with the resizing of windows.

I have absolutely _NO_ idea of the signals I have to catch else to do
that, as the signals used are absolutely _NOT_ documented anywere, which
makes writing configuration for awesome 3.4 even worse to write than it
ever was before. I mean what is the point of having a survey and
removing space invaders if the reproaches about configuration are
treated that lightly...


a _really_ annoyed user who lost about 2hours rewriting configuration
tonight.

-- 
·O·  Pierre Habouzit
··O                                                [email protected]
OOO                                                http://www.madism.org

Attachment: signature.asc
Description: Digital signature

Reply via email to