}
}
+static void copyarea(const char *what,
+ Drawable src, GC gc, int src_x, int src_y,
+ int w, int h, int dest_x, int dest_y) {
+ XCALL( XCopyArea, what,
+ (disp, src, win, gc, src_x,src_y, w,h, dest_x,dest_y) );
+// XEvent ev;
+// XSync(disp,0);
+// if (XCheckTypedEvent(disp,GraphicsExpose,&ev))
+// die_graphicsexpose(&ev);
+}
+
static void redraw(SegmovfeatState *fs) {
PosnState *src;
XGCValues gcv;
redraw_needed_count--;
}
src= 0;
- XCALL( XCopyArea, "redraw",
- (disp, bg_pixmap, win, fs->whole.gc,
- fs->whole.x, fs->whole.y,
- fs->whole.width, fs->whole.height,
- fs->whole.x, fs->whole.y) );
+ copyarea("redraw", bg_pixmap, fs->whole.gc,
+ fs->whole.x, fs->whole.y,
+ fs->whole.width, fs->whole.height,
+ fs->whole.x, fs->whole.y);
+
if (fs->flags.on) {
src= &fs->posns[fs->posn][fs->flags.inv][fs->flags.det];
- XCALL( XCopyArea, "redraw",
- (disp, src->pm, win, fs->whole.gc,
- 0,0, src->width, src->height,
- src->x, src->y) );
+ copyarea("redraw-on", src->pm, fs->whole.gc,
+ 0,0, src->width, src->height,
+ src->x, src->y);
}
if (fs->flags.trainown && src && src->edge.x >= 0) {
gcv.foreground= fs->flags.trainown>1 ? train_pixel : owned_pixel;