Ensure that queue_translation is paired with the right X operation
The X11 queue_translation operation uses NextRequest to get the serial of the XCopyArea operation where the translation should end. However, if the gc passed to gdk_draw_drawable has a non-flushed clip region (which it commonly has now for the window clipping) then the next operation will be the GC flush, not the XCopyArea. To handle this right we now pass in the GC to be used to queue_translation and ensure that it is flushed before calling NextRequest().
This commit is contained in:
@ -231,6 +231,7 @@ gdk_window_queue (GdkWindow *window,
|
||||
|
||||
void
|
||||
_gdk_x11_window_queue_translation (GdkWindow *window,
|
||||
GdkGC *gc,
|
||||
GdkRegion *area,
|
||||
gint dx,
|
||||
gint dy)
|
||||
@ -241,6 +242,11 @@ _gdk_x11_window_queue_translation (GdkWindow *window,
|
||||
item->u.translate.dx = dx;
|
||||
item->u.translate.dy = dy;
|
||||
|
||||
/* Ensure that the gc is flushed so that we get the right
|
||||
serial from NextRequest in gdk_window_queue, i.e. the
|
||||
the serial for the XCopyArea, not the ones from flushing
|
||||
the gc. */
|
||||
_gdk_x11_gc_flush (gc);
|
||||
gdk_window_queue (window, item);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user