mirror of
https://github.com/lcpz/awesome-copycats.git
synced 2024-12-23 03:32:30 +00:00
#81: only ignore mouse::enter if the client wasn't changed
This commit is contained in:
parent
f2062d0e78
commit
f55b5cd700
|
@ -602,22 +602,18 @@ awful.rules.rules = {
|
|||
|
||||
-- {{{ Signals
|
||||
-- signal function to execute when a new client appears.
|
||||
local sloppyfocus_last = {c=nil}
|
||||
client.connect_signal("manage", function (c, startup)
|
||||
-- Enable sloppy focus
|
||||
local sloppyfocus_last = {x=nil, y=nil, c=nil}
|
||||
client.connect_signal("mouse::enter", function(c)
|
||||
local mcoords = mouse.coords()
|
||||
if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier
|
||||
and awful.client.focus.filter(c) then
|
||||
-- Skip focusing the client if the mouse wasn't moved.
|
||||
if (mcoords.x ~= sloppyfocus_last.x or mcoords.y ~= sloppyfocus_last.y)
|
||||
and c ~= sloppyfocus_last.c then
|
||||
if c ~= sloppyfocus_last.c then
|
||||
client.focus = c
|
||||
sloppyfocus_last.c = c
|
||||
end
|
||||
end
|
||||
sloppyfocus_last.x = mcoords.x
|
||||
sloppyfocus_last.y = mcoords.y
|
||||
end)
|
||||
|
||||
local titlebars_enabled = false
|
||||
|
|
|
@ -673,22 +673,18 @@ awful.rules.rules = {
|
|||
|
||||
-- {{{ Signals
|
||||
-- Signal function to execute when a new client appears.
|
||||
local sloppyfocus_last = {c=nil}
|
||||
client.connect_signal("manage", function (c, startup)
|
||||
-- Enable sloppy focus
|
||||
local sloppyfocus_last = {x=nil, y=nil, c=nil}
|
||||
client.connect_signal("mouse::enter", function(c)
|
||||
local mcoords = mouse.coords()
|
||||
if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier
|
||||
and awful.client.focus.filter(c) then
|
||||
-- Skip focusing the client if the mouse wasn't moved.
|
||||
if (mcoords.x ~= sloppyfocus_last.x or mcoords.y ~= sloppyfocus_last.y)
|
||||
and c ~= sloppyfocus_last.c then
|
||||
if c ~= sloppyfocus_last.c then
|
||||
client.focus = c
|
||||
sloppyfocus_last.c = c
|
||||
end
|
||||
end
|
||||
sloppyfocus_last.x = mcoords.x
|
||||
sloppyfocus_last.y = mcoords.y
|
||||
end)
|
||||
|
||||
local titlebars_enabled = true
|
||||
|
|
|
@ -602,22 +602,18 @@ awful.rules.rules = {
|
|||
|
||||
-- {{{ Signals
|
||||
-- Signal function to execute when a new client appears.
|
||||
local sloppyfocus_last = {c=nil}
|
||||
client.connect_signal("manage", function (c, startup)
|
||||
-- Enable sloppy focus
|
||||
local sloppyfocus_last = {x=nil, y=nil, c=nil}
|
||||
client.connect_signal("mouse::enter", function(c)
|
||||
local mcoords = mouse.coords()
|
||||
if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier
|
||||
and awful.client.focus.filter(c) then
|
||||
-- Skip focusing the client if the mouse wasn't moved.
|
||||
if (mcoords.x ~= sloppyfocus_last.x or mcoords.y ~= sloppyfocus_last.y)
|
||||
and c ~= sloppyfocus_last.c then
|
||||
if c ~= sloppyfocus_last.c then
|
||||
client.focus = c
|
||||
sloppyfocus_last.c = c
|
||||
end
|
||||
end
|
||||
sloppyfocus_last.x = mcoords.x
|
||||
sloppyfocus_last.y = mcoords.y
|
||||
end)
|
||||
|
||||
local titlebars_enabled = true
|
||||
|
|
|
@ -735,22 +735,18 @@ awful.rules.rules = {
|
|||
|
||||
-- {{{ Signals
|
||||
-- Signal function to execute when a new client appears.
|
||||
local sloppyfocus_last = {c=nil}
|
||||
client.connect_signal("manage", function (c, startup)
|
||||
-- Enable sloppy focus
|
||||
local sloppyfocus_last = {x=nil, y=nil, c=nil}
|
||||
client.connect_signal("mouse::enter", function(c)
|
||||
local mcoords = mouse.coords()
|
||||
if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier
|
||||
and awful.client.focus.filter(c) then
|
||||
-- Skip focusing the client if the mouse wasn't moved.
|
||||
if (mcoords.x ~= sloppyfocus_last.x or mcoords.y ~= sloppyfocus_last.y)
|
||||
and c ~= sloppyfocus_last.c then
|
||||
if c ~= sloppyfocus_last.c then
|
||||
client.focus = c
|
||||
sloppyfocus_last.c = c
|
||||
end
|
||||
end
|
||||
sloppyfocus_last.x = mcoords.x
|
||||
sloppyfocus_last.y = mcoords.y
|
||||
end)
|
||||
|
||||
local titlebars_enabled = false
|
||||
|
|
|
@ -673,22 +673,18 @@ awful.rules.rules = {
|
|||
|
||||
-- {{{ Signals
|
||||
-- signal function to execute when a new client appears.
|
||||
local sloppyfocus_last = {c=nil}
|
||||
client.connect_signal("manage", function (c, startup)
|
||||
-- Enable sloppy focus
|
||||
local sloppyfocus_last = {x=nil, y=nil, c=nil}
|
||||
client.connect_signal("mouse::enter", function(c)
|
||||
local mcoords = mouse.coords()
|
||||
if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier
|
||||
and awful.client.focus.filter(c) then
|
||||
-- Skip focusing the client if the mouse wasn't moved.
|
||||
if (mcoords.x ~= sloppyfocus_last.x or mcoords.y ~= sloppyfocus_last.y)
|
||||
and c ~= sloppyfocus_last.c then
|
||||
if c ~= sloppyfocus_last.c then
|
||||
client.focus = c
|
||||
sloppyfocus_last.c = c
|
||||
end
|
||||
end
|
||||
sloppyfocus_last.x = mcoords.x
|
||||
sloppyfocus_last.y = mcoords.y
|
||||
end)
|
||||
|
||||
local titlebars_enabled = false
|
||||
|
|
|
@ -648,22 +648,18 @@ awful.rules.rules = {
|
|||
|
||||
-- {{{ Signals
|
||||
-- signal function to execute when a new client appears.
|
||||
local sloppyfocus_last = {c=nil}
|
||||
client.connect_signal("manage", function (c, startup)
|
||||
-- Enable sloppy focus
|
||||
local sloppyfocus_last = {x=nil, y=nil, c=nil}
|
||||
client.connect_signal("mouse::enter", function(c)
|
||||
local mcoords = mouse.coords()
|
||||
if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier
|
||||
and awful.client.focus.filter(c) then
|
||||
-- Skip focusing the client if the mouse wasn't moved.
|
||||
if (mcoords.x ~= sloppyfocus_last.x or mcoords.y ~= sloppyfocus_last.y)
|
||||
and c ~= sloppyfocus_last.c then
|
||||
if c ~= sloppyfocus_last.c then
|
||||
client.focus = c
|
||||
sloppyfocus_last.c = c
|
||||
end
|
||||
end
|
||||
sloppyfocus_last.x = mcoords.x
|
||||
sloppyfocus_last.y = mcoords.y
|
||||
end)
|
||||
|
||||
local titlebars_enabled = false
|
||||
|
|
|
@ -600,22 +600,18 @@ awful.rules.rules = {
|
|||
|
||||
-- {{{ Signals
|
||||
-- signal function to execute when a new client appears.
|
||||
local sloppyfocus_last = {c=nil}
|
||||
client.connect_signal("manage", function (c, startup)
|
||||
-- Enable sloppy focus
|
||||
local sloppyfocus_last = {x=nil, y=nil, c=nil}
|
||||
client.connect_signal("mouse::enter", function(c)
|
||||
local mcoords = mouse.coords()
|
||||
if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier
|
||||
and awful.client.focus.filter(c) then
|
||||
-- Skip focusing the client if the mouse wasn't moved.
|
||||
if (mcoords.x ~= sloppyfocus_last.x or mcoords.y ~= sloppyfocus_last.y)
|
||||
and c ~= sloppyfocus_last.c then
|
||||
if c ~= sloppyfocus_last.c then
|
||||
client.focus = c
|
||||
sloppyfocus_last.c = c
|
||||
end
|
||||
end
|
||||
sloppyfocus_last.x = mcoords.x
|
||||
sloppyfocus_last.y = mcoords.y
|
||||
end)
|
||||
|
||||
local titlebars_enabled = false
|
||||
|
|
|
@ -609,22 +609,18 @@ awful.rules.rules = {
|
|||
|
||||
-- {{{ Signals
|
||||
-- signal function to execute when a new client appears.
|
||||
local sloppyfocus_last = {c=nil}
|
||||
client.connect_signal("manage", function (c, startup)
|
||||
-- Enable sloppy focus
|
||||
local sloppyfocus_last = {x=nil, y=nil, c=nil}
|
||||
client.connect_signal("mouse::enter", function(c)
|
||||
local mcoords = mouse.coords()
|
||||
if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier
|
||||
and awful.client.focus.filter(c) then
|
||||
-- Skip focusing the client if the mouse wasn't moved.
|
||||
if (mcoords.x ~= sloppyfocus_last.x or mcoords.y ~= sloppyfocus_last.y)
|
||||
and c ~= sloppyfocus_last.c then
|
||||
if c ~= sloppyfocus_last.c then
|
||||
client.focus = c
|
||||
sloppyfocus_last.c = c
|
||||
end
|
||||
end
|
||||
sloppyfocus_last.x = mcoords.x
|
||||
sloppyfocus_last.y = mcoords.y
|
||||
end)
|
||||
|
||||
local titlebars_enabled = false
|
||||
|
|
Loading…
Reference in a new issue