mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-07-29 07:14:45 +02:00
signals: don't follow focus if a mouse button is pressed
This commit is contained in:
parent
58d7c0fcfa
commit
112e1cf091
1 changed files with 8 additions and 3 deletions
|
@ -35,9 +35,14 @@ client.add_signal("manage",
|
|||
-- If a window change its geometry, track it with the mouse
|
||||
c:add_signal("property::geometry",
|
||||
function()
|
||||
if client.focus == c then
|
||||
mouse_follow_focus(c)
|
||||
end
|
||||
-- Check if the current focused client is our
|
||||
if client.focus ~=c then return end
|
||||
-- Check that no button is pressed
|
||||
local buttons = mouse.coords().buttons
|
||||
for _, state in pairs(buttons) do
|
||||
if state then return end
|
||||
end
|
||||
mouse_follow_focus(c)
|
||||
end)
|
||||
|
||||
-- Setup icon if none exists
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue