HandleExposure (screen, event) register TScreen *screen; register XEvent *event;
HandleExposure ( register TScreen *screen, register XEvent *event)
HandleExposure (screen, event)    register TScreen *screen;    register XEvent *event;{    register XExposeEvent *reply = (XExposeEvent *)event;#ifndef NO_ACTIVE_ICON    if (reply->window == screen->iconVwin.window)	screen->whichVwin = &screen->iconVwin;    else	screen->whichVwin = &screen->fullVwin;#endif /* NO_ACTIVE_ICON */    /* if not doing CopyArea or if this is a GraphicsExpose, don't translate */    if(!screen->incopy  ||  event->type != Expose)	return handle_translated_exposure (screen, reply->x, reply->y,					   reply->width, reply->height);    else {	/* compute intersection of area being copied with	   area being exposed. */	int both_x1 = Max(screen->copy_src_x, reply->x);	int both_y1 = Max(screen->copy_src_y, reply->y);	int both_x2 = Min(screen->copy_src_x+screen->copy_width,			  (unsigned)(reply->x+reply->width));	int both_y2 = Min(screen->copy_src_y+screen->copy_height,			  (unsigned)(reply->y+reply->height));	int value = 0;	/* was anything copied affected? */	if(both_x2 > both_x1  && both_y2 > both_y1) {	    /* do the copied area */	    value = handle_translated_exposure		(screen, reply->x + screen->copy_dest_x - screen->copy_src_x,		 reply->y + screen->copy_dest_y - screen->copy_src_y,		 reply->width, reply->height);	}	/* was anything not copied affected? */	if(reply->x < both_x1 || reply->y < both_y1	   || reply->x+reply->width > both_x2	   || reply->y+reply->height > both_y2)	    value = handle_translated_exposure (screen, reply->x, reply->y,						reply->width, reply->height);	return value;    }}