shims: Prevent signals when setting the client geo to the same value.
This commit is contained in:
parent
8bdabb234b
commit
e5a84e2fda
|
@ -1,4 +1,5 @@
|
|||
local gears_obj = require("gears.object")
|
||||
local grect = require("gears.geometry").rectangle
|
||||
|
||||
local clients = {}
|
||||
|
||||
|
@ -98,7 +99,14 @@ function client.gen_fake(args)
|
|||
|
||||
-- Emulate capi.client.geometry
|
||||
function ret:geometry(new)
|
||||
if new then
|
||||
local new_full = new and {
|
||||
x = new.x or ret.x,
|
||||
y = new.y or ret.y,
|
||||
width = new.width or ret.width,
|
||||
height = new.height or ret.height,
|
||||
} or nil
|
||||
|
||||
if new and not grect.are_equal(ret, new_full) then
|
||||
for k,v in pairs(new) do
|
||||
ret[k] = v
|
||||
ret:emit_signal("property::"..k, v)
|
||||
|
@ -130,6 +138,12 @@ function client.gen_fake(args)
|
|||
ret._old_geo[#ret._old_geo]._hide = true
|
||||
end
|
||||
|
||||
function ret:_hide_all()
|
||||
for _, geo in ipairs(ret._old_geo) do
|
||||
geo._hide = true
|
||||
end
|
||||
end
|
||||
|
||||
function ret:get_xproperty()
|
||||
return nil
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue