From: Ian Jackson Date: Sun, 12 Dec 2010 12:06:55 +0000 (+0000) Subject: hostside/gui-plan: special die handler for GrapicsExpose events (no change other... X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ijackson/git?a=commitdiff_plain;h=e811753603f6204406bbc6dc527389c01864ffb3;p=trains.git hostside/gui-plan: special die handler for GrapicsExpose events (no change other than in die path) --- diff --git a/hostside/gui-plan.c b/hostside/gui-plan.c index a25f071..685f475 100644 --- a/hostside/gui-plan.c +++ b/hostside/gui-plan.c @@ -19,6 +19,7 @@ #include #include +#include typedef int ErrorCode; @@ -119,6 +120,21 @@ static void diexpm(const char *fn, const char *w, int xpmst) { diexpm(#f, (w), xpmcall_xpmst); \ }while(0) +static void die_graphicsexpose(const XEvent *ev) { + die("GraphicsExpose %lx(%s) x=%d y=%d w=%d h=%d count=%d" + " major=%d(%s)", + (unsigned long)ev->xgraphicsexpose.drawable, + ev->xgraphicsexpose.drawable==win ? "w" : "?", + ev->xgraphicsexpose.x, + ev->xgraphicsexpose.y, + ev->xgraphicsexpose.width, + ev->xgraphicsexpose.height, + ev->xgraphicsexpose.count, + ev->xgraphicsexpose.major_code, + ev->xgraphicsexpose.major_code==X_CopyArea ? "CA" : + ev->xgraphicsexpose.major_code==X_CopyPlane ? "CP" : "?"); +} + /*---------- input handling ----------*/ typedef struct { @@ -305,6 +321,7 @@ static void xlib_process(void) { switch (ev.type) { case Expose: xlib_expose(&ev.xexpose); break; case NoExpose: break; + case GraphicsExpose: die_graphicsexpose(&ev); default: die("unrequested event type %d\n",ev.type); } }