xglcomp

changeset 8:b0081a0c211f

damage issues
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 30 Jan 2016 07:58:07 +0200
parents 03ca0fd49916
children 245dd960f0b3
files src/cwin.cc src/main.cc
diffstat 2 files changed, 4 insertions(+), 3 deletions(-) [+]
line diff
     1.1 --- a/src/cwin.cc	Sat Jan 30 07:48:51 2016 +0200
     1.2 +++ b/src/cwin.cc	Sat Jan 30 07:58:07 2016 +0200
     1.3 @@ -36,8 +36,10 @@
     1.4  		return;
     1.5  	}
     1.6  
     1.7 +	XGetWindowAttributes(dpy, cwin->xwin, &cwin->attr);
     1.8 +
     1.9  	// create the damage structure to track dirty regions in this window
    1.10 -	if(!cwin->damage) {
    1.11 +	if(!cwin->damage && cwin->attr.c_class != InputOnly) {
    1.12  		cwin->damage = XDamageCreate(dpy, cwin->xwin, XDamageReportNonEmpty);
    1.13  	}
    1.14  
     2.1 --- a/src/main.cc	Sat Jan 30 07:48:51 2016 +0200
     2.2 +++ b/src/main.cc	Sat Jan 30 07:58:07 2016 +0200
     2.3 @@ -208,9 +208,8 @@
     2.4  {
     2.5  	//log_debug("manage_window %u\n", xwin);
     2.6  	CompWindow *cwin = new CompWindow(xwin);
     2.7 -	XGetWindowAttributes(dpy, xwin, &cwin->attr);
     2.8 +	add_window(cwin);
     2.9  	cwin->mapped = cwin->attr.map_state != IsUnmapped;
    2.10 -	add_window(cwin);
    2.11  }
    2.12  
    2.13  static void unmanage_window(Window xwin)