mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-07-31 08:14:26 +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
|
-- If a window change its geometry, track it with the mouse
|
||||||
c:add_signal("property::geometry",
|
c:add_signal("property::geometry",
|
||||||
function()
|
function()
|
||||||
if client.focus == c then
|
-- Check if the current focused client is our
|
||||||
mouse_follow_focus(c)
|
if client.focus ~=c then return end
|
||||||
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)
|
end)
|
||||||
|
|
||||||
-- Setup icon if none exists
|
-- Setup icon if none exists
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue