Avoid unnecessary GraphicsExpose events.
diff --git a/graphics/x11drv/bitblt.c b/graphics/x11drv/bitblt.c
index 4b1be45..1ce1a0a 100644
--- a/graphics/x11drv/bitblt.c
+++ b/graphics/x11drv/bitblt.c
@@ -1242,27 +1242,29 @@
case SRCCOPY: /* 0xcc */
if (dcSrc->w.bitsPerPixel == dcDst->w.bitsPerPixel)
{
- XSetGraphicsExposures( display, physDevDst->gc, True );
+ BOOL expose = !(dcSrc->w.flags & DC_MEMORY) && !(dcDst->w.flags & DC_MEMORY);
+ if ( expose ) XSetGraphicsExposures( display, physDevDst->gc, True );
XSetFunction( display, physDevDst->gc, GXcopy );
XCopyArea( display, physDevSrc->drawable,
physDevDst->drawable, physDevDst->gc,
visRectSrc.left, visRectSrc.top,
width, height, visRectDst.left, visRectDst.top );
- XSetGraphicsExposures( display, physDevDst->gc, False );
+ if ( expose ) XSetGraphicsExposures( display, physDevDst->gc, False );
return TRUE;
}
if (dcSrc->w.bitsPerPixel == 1)
{
+ BOOL expose = !(dcSrc->w.flags & DC_MEMORY) && !(dcDst->w.flags & DC_MEMORY);
XSetBackground( display, physDevDst->gc, physDevDst->textPixel );
XSetForeground( display, physDevDst->gc,
physDevDst->backgroundPixel );
XSetFunction( display, physDevDst->gc, GXcopy );
- XSetGraphicsExposures( display, physDevDst->gc, True );
+ if ( expose ) XSetGraphicsExposures( display, physDevDst->gc, True );
XCopyPlane( display, physDevSrc->drawable,
physDevDst->drawable, physDevDst->gc,
visRectSrc.left, visRectSrc.top,
width, height, visRectDst.left, visRectDst.top, 1 );
- XSetGraphicsExposures( display, physDevDst->gc, False );
+ if ( expose ) XSetGraphicsExposures( display, physDevDst->gc, False );
return TRUE;
}
break;
@@ -1290,6 +1292,7 @@
}
tmpGC = XCreateGC( display, physDevDst->drawable, 0, NULL );
+ XSetGraphicsExposures( display, tmpGC, False );
pixmaps[DST] = XCreatePixmap( display, X11DRV_GetXRootWindow(), width, height,
dcDst->w.bitsPerPixel );
if (useSrc)
diff --git a/graphics/x11drv/bitmap.c b/graphics/x11drv/bitmap.c
index de17e60..c5323b8 100644
--- a/graphics/x11drv/bitmap.c
+++ b/graphics/x11drv/bitmap.c
@@ -112,6 +112,7 @@
{
TSXFreeGC( display, physDev->gc );
physDev->gc = TSXCreateGC( display, physDev->drawable, 0, NULL );
+ TSXSetGraphicsExposures( display, physDev->gc, False );
dc->w.bitsPerPixel = bmp->bitmap.bmBitsPixel;
DC_InitDC( dc );
}
diff --git a/windows/x11drv/event.c b/windows/x11drv/event.c
index 7d41561..db5e7e9 100644
--- a/windows/x11drv/event.c
+++ b/windows/x11drv/event.c
@@ -402,8 +402,12 @@
}
}
- TRACE(event, "Got event %s for hwnd %04x\n",
- event_names[event->type], pWnd? pWnd->hwndSelf : 0 );
+ if ( !pWnd && event->xany.window != X11DRV_GetXRootWindow() )
+ ERR( event, "Got event %s for unknown Window %08lx\n",
+ event_names[event->type], event->xany.window );
+ else
+ TRACE( event, "Got event %s for hwnd %04x\n",
+ event_names[event->type], pWnd? pWnd->hwndSelf : 0 );
switch(event->type)
{