THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

A new Flyspray task has been opened.  Details are below. 

User who did this - Daniel Hahler (blueyed) 

Attached to Project - awesome
Summary - Improve sloppy focus to not steal focus
Task Type - Bug Report
Category - Core
Status - Unconfirmed
Assigned To - 
Operating System - All
Severity - Low
Priority - Normal
Reported Version - git/master
Due in Version - Undecided
Due Date - Undecided
Details - With the sloppy focus handler from the default config, the focus 
might get stolen, when using a tool like clipit: on pressing a hotkey, a dialog 
appears, and it you close it, the mouse::enter signal gets emitted.

The following enhances the handler to only focus itself, if the mouse 
coordinates have changed:
https://gist.github.com/blueyed/9770700

        client.connect_signal("manage", function (c)
                -- Enable sloppy focus
                local sloppy_focus_last_coords = mouse.coords()
                c:connect_signal("mouse::enter", function(c)
                        local coords = mouse.coords()
                        local last = sloppy_focus_last_coords
                        if coords.x == last.x and coords.y == last.y then
                                return
                        end
                        if awful.layout.get(c.screen) ~= 
awful.layout.suit.magnifier
                                and awful.client.focus.filter(c) then
                                client.focus = c
                        end
                        sloppy_focus_last_coords = {x=coords.x, y=coords.y}
                end)

What do you think? Does it make sense, and/or can it get improved?

Awesome 3.5.2.


More information can be found at the following URL:
https://awesome.naquadah.org/bugs/index.php?do=details&task_id=1239

You are receiving this message because you have requested it from the Flyspray 
bugtracking system.  If you did not expect this message or don't want to 
receive mails in future, you can change your notification settings at the URL 
shown above.

--
To unsubscribe, send mail to awesome-devel-unsubscr...@naquadah.org.

Reply via email to