[gtk+] Make gdk_drawable_get_visible/clip_region handle the !viewable case
- From: Alexander Larsson <alexl src gnome org>
- To: svn-commits-list gnome org
- Subject: [gtk+] Make gdk_drawable_get_visible/clip_region handle the !viewable case
- Date: Mon, 20 Jul 2009 20:36:15 +0000 (UTC)
commit 36861cf6088442bfe438be6b48a1b19c85c61a01
Author: Alexander Larsson <alexl redhat com>
Date: Mon Jul 20 22:30:48 2009 +0200
Make gdk_drawable_get_visible/clip_region handle the !viewable case
We can't access ->clip_region for these cases as its not yet calculated.
gdk/gdkwindow.c | 21 ++++++++++++---------
1 files changed, 12 insertions(+), 9 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index a3718bb..9ceb5d1 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -3494,12 +3494,23 @@ gdk_window_get_composite_drawable (GdkDrawable *drawable,
}
static GdkRegion*
+gdk_window_get_visible_region (GdkDrawable *drawable)
+{
+ GdkWindowObject *private = (GdkWindowObject*) drawable;
+
+ if (private->viewable)
+ return gdk_region_copy (private->clip_region);
+ else
+ return gdk_region_new ();
+}
+
+static GdkRegion*
gdk_window_get_clip_region (GdkDrawable *drawable)
{
GdkWindowObject *private = (GdkWindowObject *)drawable;
GdkRegion *result;
- result = gdk_region_copy (private->clip_region);
+ result = gdk_window_get_visible_region (drawable);
if (private->paint_stack)
{
@@ -3522,14 +3533,6 @@ gdk_window_get_clip_region (GdkDrawable *drawable)
return result;
}
-static GdkRegion*
-gdk_window_get_visible_region (GdkDrawable *drawable)
-{
- GdkWindowObject *private = (GdkWindowObject*) drawable;
-
- return gdk_region_copy (private->clip_region);
-}
-
static void
gdk_window_draw_drawable (GdkDrawable *drawable,
GdkGC *gc,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]