From 7639a611161271ed76d3a30fd5b37a136ddd00aa Mon Sep 17 00:00:00 2001 From: Richard Hult Date: Mon, 10 Dec 2007 19:38:47 +0000 Subject: [PATCH] Ignore drawRect calls with zero sized areas at (0, 0), patch from Paul 2007-12-10 Richard Hult * gdk/quartz/GdkQuartzView.c: Ignore drawRect calls with zero sized areas at (0, 0), patch from Paul Davis. svn path=/trunk/; revision=19145 --- ChangeLog | 5 +++++ gdk/quartz/GdkQuartzView.c | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/ChangeLog b/ChangeLog index 338d50b478..3f4b7e2e2a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-12-10 Richard Hult + + * gdk/quartz/GdkQuartzView.c: Ignore drawRect calls with zero + sized areas at (0, 0), patch from Paul Davis. + 2007-12-10 Richard Hult * gdk/quartz/gdkprivate-quartz.h: diff --git a/gdk/quartz/GdkQuartzView.c b/gdk/quartz/GdkQuartzView.c index 0052134321..1521b16057 100644 --- a/gdk/quartz/GdkQuartzView.c +++ b/gdk/quartz/GdkQuartzView.c @@ -64,6 +64,15 @@ if (!(private->event_mask & GDK_EXPOSURE_MASK)) return; + /* For some reason, we occasionally get draw requests for zero sized rects + * at 0,0, just ignore those. + */ + if (rect.origin.x == 0 && rect.origin.y == 0 && + rect.size.width == 0 && rect.size.height == 0) + { + return; + } + GDK_QUARTZ_ALLOC_POOL; [self getRectsBeingDrawn:&drawn_rects count:&count];