diff options
| author | Daniel Friesel <derf@finalrewind.org> | 2019-07-08 19:23:39 +0200 | 
|---|---|---|
| committer | Daniel Friesel <derf@finalrewind.org> | 2019-07-08 19:23:39 +0200 | 
| commit | ec1bcf0bfe4c0d85cbebbcd1fd1fd736472c210b (patch) | |
| tree | cc74837583cc58477bbbb451f441007218577a63 | |
| parent | 990fcd92835f7626c1fc3d14c7efb2934a5055d3 (diff) | |
| parent | d34f39c8f2b750a487ee6337c4333e620ecc9b10 (diff) | |
Merge branch 'CrackedP0t-geometry'
| -rw-r--r-- | src/winwidget.c | 9 | 
1 files changed, 8 insertions, 1 deletions
| diff --git a/src/winwidget.c b/src/winwidget.c index 4cdb929..70a65e0 100644 --- a/src/winwidget.c +++ b/src/winwidget.c @@ -811,6 +811,8 @@ void winwidget_show(winwidget winwid)  		/* wait for the window to map */  		D(("Waiting for window to map\n"));  		XMaskEvent(disp, StructureNotifyMask, &ev); +		winwidget_get_geometry(winwid, NULL); +  		/* Unfortunately, StructureNotifyMask does not only mask  		 * the events of type MapNotify (which we want to mask here)  		 * but also such of type ConfigureNotify (and others, see @@ -910,6 +912,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; @@ -1149,8 +1153,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); | 
