awful.ewmh: Enforce client geometry (FS#764,FS#1216)
When a client's geometry changes (and I consider the border width to be part of the geometry here) and that client is one of fullscreen or maximized_{horizontally,vertically}, make sure that the geometry as specified by the state is still obeyed. This also (accidentally) fixes things when a client gets moved to another screen! Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
910cbe401d
commit
20afb26080
|
@ -113,8 +113,8 @@ local function screen_change(window)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Update a client's settings when its border width changes
|
-- Update a client's settings when its geometry changes
|
||||||
local function border_change(window)
|
local function geometry_change(window)
|
||||||
-- Fix up the geometry in case this window needs to cover the whole screen.
|
-- Fix up the geometry in case this window needs to cover the whole screen.
|
||||||
local bw = window.border_width or 0
|
local bw = window.border_width or 0
|
||||||
local g = screen[window.screen].workarea
|
local g = screen[window.screen].workarea
|
||||||
|
@ -147,7 +147,8 @@ client.connect_signal("request::maximized_horizontal", maximized_horizontal)
|
||||||
client.connect_signal("request::maximized_vertical", maximized_vertical)
|
client.connect_signal("request::maximized_vertical", maximized_vertical)
|
||||||
client.connect_signal("request::fullscreen", fullscreen)
|
client.connect_signal("request::fullscreen", fullscreen)
|
||||||
client.connect_signal("property::screen", screen_change)
|
client.connect_signal("property::screen", screen_change)
|
||||||
client.connect_signal("property::border_width", border_change)
|
client.connect_signal("property::border_width", geometry_change)
|
||||||
|
client.connect_signal("property::geometry", geometry_change)
|
||||||
|
|
||||||
return ewmh
|
return ewmh
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue