win: fix calculation of window frame region

The geometry returned by xcb_get_geometry doesn't include the window
border, so we have to include that when calculating the frame.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui
2020-03-17 18:32:34 +00:00
parent cf3e95f0a4
commit fb3305fb9b
2 changed files with 9 additions and 5 deletions

View File

@ -107,6 +107,8 @@ struct managed_win {
winstate_t state;
/// Window attributes.
xcb_get_window_attributes_reply_t a;
/// Reply of xcb_get_geometry, which returns the geometry of the window body,
/// excluding the window border.
xcb_get_geometry_reply_t g;
/// Xinerama screen this window is on.
int xinerama_scr;