summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorElaina Martineau <elainamartineau@gmail.com>2019-03-14 17:31:58 -0600
committerElaina Martineau <elainamartineau@gmail.com>2019-03-14 17:31:58 -0600
commit6af56d5411a0ced369d6f8125092fd1a051b497e (patch)
treef2a6c59819e14ba81184197aa84c9ad93ebb43c2 /src
parente40399f4cd63fd55f38733ef698b8833bd6f9f61 (diff)
Get actual geometry from Xlib after resize
Diffstat (limited to 'src')
-rw-r--r--src/winwidget.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/winwidget.c b/src/winwidget.c
index bb4fdae..12fb8df 100644
--- a/src/winwidget.c
+++ b/src/winwidget.c
@@ -820,6 +820,8 @@ void winwidget_resize(winwidget winwid, int w, int h, int force_resize)
winwid->had_resize = 1;
XFlush(disp);
+ winwidget_get_geometry(winwid, NULL);
+
if (force_resize && (opt.geom_flags & (WidthValue | HeightValue))
&& (winwid->type != WIN_TYPE_THUMBNAIL)) {
opt.geom_w = winwid->w;
@@ -1059,8 +1061,11 @@ void winwidget_get_geometry(winwidget winwid, int *rect)
{
unsigned int bw, bp;
Window child;
+
+ int inner_rect[4];
+
if (!rect)
- return;
+ rect = inner_rect;
XGetGeometry(disp, winwid->win, &root, &(rect[0]), &(rect[1]), (unsigned
int *)&(rect[2]), (unsigned int *)&(rect[3]), &bw, &bp);