summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2010-01-15 15:06:12 (GMT)
committerAlexander Larsson <alexl@redhat.com>2010-01-15 15:21:48 (GMT)
commitf2fffaad71c012d110ad79a1f15afdb81c580d2f (patch)
tree18d6828e624adc3cac283a6879503ded6064b250
parent5fcae34f2719db7ee2b022956deb77efebe82d31 (diff)
downloadgtk+-f2fffaad71c012d110ad79a1f15afdb81c580d2f.zip
gtk+-f2fffaad71c012d110ad79a1f15afdb81c580d2f.tar.xz
Avoid drawing implicit paints to destroyed windows
It may happen that a window gets destroyed during painting, if so we should not draw the implicit paint double-buffered pixmap to it as that will cause a BadDrawable X error. This fixes bug 600865 (cherry picked from commit f96e51db46f2196707c0ea44a46f1d67f9a069d4)
-rw-r--r--gdk/gdkwindow.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 5e9e44f..612f5ac 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -2668,7 +2668,7 @@ gdk_window_flush_implicit_paint (GdkWindow *window)
gdk_region_offset (region, private->abs_x, private->abs_y);
gdk_region_intersect (region, paint->region);
- if (!gdk_region_empty (region))
+ if (!GDK_WINDOW_DESTROYED (window) && !gdk_region_empty (region))
{
/* Remove flushed region from the implicit paint */
gdk_region_subtract (paint->region, region);
@@ -2701,7 +2701,7 @@ gdk_window_end_implicit_paint (GdkWindow *window)
private->implicit_paint = NULL;
- if (!gdk_region_empty (paint->region))
+ if (!GDK_WINDOW_DESTROYED (window) && !gdk_region_empty (paint->region))
{
/* Some regions are valid, push these to window now */
tmp_gc = _gdk_drawable_get_scratch_gc ((GdkDrawable *)window, FALSE);