switch (RrSurfaceType(sur)) {
case RR_SURFACE_PLANAR:
- RrPlanarPaint(sur, x, y, w, h);
+ RrPlanarPaint(sur, RrSurfaceX(sur) + x, RrSurfaceY(sur) + y, w, h);
break;
case RR_SURFACE_NONPLANAR:
assert(0);
#define RrPlanarColorType(sur) ((sur)->data.planar.colortype)
#define RrPlanarPrimaryColor(sur) ((sur)->data.planar.primary)
-#define RrPlanarSecondaryColor(sur) ((sur)->data.planar.primary)
+#define RrPlanarSecondaryColor(sur) ((sur)->data.planar.secondary)
void RrPlanarPaint(struct RrSurface *sur, int x, int y, int w, int h);
{
Display *display;
Window win;
- XEvent report;
+ XEvent report, report2;
XClassHint chint;
Atom delete_win, protocols;
int quit;
if ((Atom)report.xclient.data.l[0] == delete_win)
quit = 1;
case Expose:
- RrPaint(sur);
- break;
+ if (XCheckTypedWindowEvent(display, win, ConfigureNotify,
+ &report2)) {
+ XPutBackEvent(display, &report);
+ XPutBackEvent(display, &report2);
+ /* fall through ... */
+ } else {
+ while (XCheckTypedWindowEvent(display, win, Expose, &report));
+ RrPaintArea(sur, report.xexpose.x, report.xexpose.y,
+ report.xexpose.width, report.xexpose.height);
+ break;
+ }
case ConfigureNotify:
+ while (XCheckTypedWindowEvent(display, win, ConfigureNotify,
+ &report));
RrSurfaceSetArea(sur,
report.xconfigure.x,
report.xconfigure.y,