for( int i=sizeof(xfont)/sizeof(xfont[0]); --i>=0; )
XFreeFont(display, this->*xfont[i]);
-// bug in X causes XRenderExtensionInfo to be damaged if this is done here
-// left to be done in XCloseDisplay by Xlib.
-#if defined(HAVE_XFT) && 0
+// past bug in X caused XRenderExtensionInfo to be damaged
+// if this is done here. left to be done in XCloseDisplay by Xlib.
+// works in more modern systems, and needed for leak testing.
+#if defined(HAVE_XFT) && defined(VALGRIND)
static void *BC_WindowBase::*xft_font[] = {
&BC_WindowBase::smallfont_xft,
&BC_WindowBase::mediumfont_xft,
}
}
}
+
+ static int xsynch = -1;
+ if( xsynch < 0 ) {
+ const char *cp = getenv("CIN_XSYNCH");
+ xsynch = !cp ? 0 : atoi(cp);
+ }
+ if( xsynch > 0 )
+ XSynchronize(display, True);
+
return display;
}
// event_names[event->type] : "Unknown");
//}
- if( active_grab && active_grab->grab_event(event) ) {
+ if( active_grab ) {
unlock_window();
- return 0;
+ active_grab->lock_window("BC_WindowBase::dispatch_event 3");
+ result = active_grab->grab_event(event);
+ active_grab->unlock_window();
+ if( result ) return result;
+ lock_window("BC_WindowBase::dispatch_event 4");
}
-
switch(event->type) {
case ClientMessage:
// Clear the resize buffer