activate: Merge the old hardcoded focus filter with awful.ewmh one.
This code was attached to mouse::enter in `rc.lua` instead of being part of the unified request::activate architecture. There is currently no way to detach this focus filter because it is generally correct.
This commit is contained in:
parent
26e4856821
commit
091adca070
|
@ -15,6 +15,7 @@ local aclient = require("awful.client")
|
||||||
local aplace = require("awful.placement")
|
local aplace = require("awful.placement")
|
||||||
local asuit = require("awful.layout.suit")
|
local asuit = require("awful.layout.suit")
|
||||||
local beautiful = require("beautiful")
|
local beautiful = require("beautiful")
|
||||||
|
local alayout = require("awful.layout")
|
||||||
|
|
||||||
local ewmh = {
|
local ewmh = {
|
||||||
generic_activate_filters = {},
|
generic_activate_filters = {},
|
||||||
|
@ -400,6 +401,15 @@ function ewmh.client_geometry_requests(c, context, hints)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- The magnifier layout doesn't work with focus follow mouse.
|
||||||
|
ewmh.add_activate_filter(function(c)
|
||||||
|
if alayout.get(c.screen) ~= alayout.suit.magnifier
|
||||||
|
and aclient.focus.filter(c) then
|
||||||
|
return nil
|
||||||
|
else
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
end, "mouse_enter")
|
||||||
|
|
||||||
client.connect_signal("request::activate", ewmh.activate)
|
client.connect_signal("request::activate", ewmh.activate)
|
||||||
client.connect_signal("request::tag", ewmh.tag)
|
client.connect_signal("request::tag", ewmh.tag)
|
||||||
|
|
Loading…
Reference in New Issue