Fix fullscreen clients with gravity != NorthWest (#1764)
Once upon a time,4b9584fdb1
already fixed this problem: We have to set the border width to zero before applying the new geometry to the client, because changing the border width makes the client move according to its gravity. Then camee54387904b
and made this code use awful.placement instead of just fullscreening the client itself (without explaining why in the commit message!). After this commit, the border width was just ignored and left as-is. This was then fixed in0bf8bb6a64
(no idea which callback the commit message refers to, the old code was basically just c.border_width=0, c:geometry(screen_geo)). However, now the border width was again changed after the geometry and the bug that was fixed by4b9584fdb1
was back. This commit fixes this regression again by making sure that the border width is set to zero before the geometry is set. This becomes slightly more complicated, because now it is also awful.placement's job to restore the old border width. This is why this commit adds a new option to awful.placement so that it sets the border width to zero after creating its memento of the old border width. Fixes: https://github.com/awesomeWM/awesome/issues/1607 Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
3ed0be6d85
commit
f22a69d54e
|
@ -292,18 +292,14 @@ function ewmh.geometry(c, context, hints)
|
|||
|
||||
if original_context == "fullscreen" and beautiful.fullscreen_hide_border ~= false then
|
||||
props.ignore_border_width = true
|
||||
props.zap_border_width = true
|
||||
end
|
||||
|
||||
aplace[context](c, props)
|
||||
|
||||
-- Remove the border to get a "real" fullscreen.
|
||||
if original_context == "fullscreen" and beautiful.fullscreen_hide_border ~= false then
|
||||
local original = repair_geometry_lock
|
||||
repair_geometry_lock = true
|
||||
c.border_width = 0
|
||||
aplace[context](c, props)
|
||||
repair_geometry_lock = original
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
client.connect_signal("request::activate", ewmh.activate)
|
||||
|
|
|
@ -352,6 +352,9 @@ end
|
|||
-- @treturn The drawin's area.
|
||||
area_common = function(d, new_geo, ignore_border_width, args)
|
||||
-- The C side expect no arguments, nil isn't valid
|
||||
if new_geo and args.zap_border_width then
|
||||
d.border_width = 0
|
||||
end
|
||||
local geometry = new_geo and d:geometry(new_geo) or d:geometry()
|
||||
local border = ignore_border_width and 0 or d.border_width or 0
|
||||
|
||||
|
|
Loading…
Reference in New Issue