summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--x11-toolkits/gtk20/Makefile4
-rw-r--r--x11-toolkits/gtk20/files/patch-DND-vnc-fix84
2 files changed, 86 insertions, 2 deletions
diff --git a/x11-toolkits/gtk20/Makefile b/x11-toolkits/gtk20/Makefile
index 375fe3cbe..9b0a73ff7 100644
--- a/x11-toolkits/gtk20/Makefile
+++ b/x11-toolkits/gtk20/Makefile
@@ -3,13 +3,13 @@
# Whom: Vanilla I. Shu <vanilla@MinJe.com.TW>
#
# $FreeBSD$
-# $MCom: ports/x11-toolkits/gtk20/Makefile,v 1.227 2011/11/12 19:04:12 kwm Exp $
+# $MCom: ports/x11-toolkits/gtk20/Makefile,v 1.228 2011/12/22 13:43:43 kwm Exp $
#
# Remember to update graphics/gtk-update-icon-cache too.
PORTNAME= gtk
PORTVERSION= 2.24.8
-PORTREVISION?= 0
+PORTREVISION?= 1
CATEGORIES= x11-toolkits
MASTER_SITES= GNOME
MASTER_SITE_SUBDIR= sources/gtk+/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/}
diff --git a/x11-toolkits/gtk20/files/patch-DND-vnc-fix b/x11-toolkits/gtk20/files/patch-DND-vnc-fix
new file mode 100644
index 000000000..35ee2fae9
--- /dev/null
+++ b/x11-toolkits/gtk20/files/patch-DND-vnc-fix
@@ -0,0 +1,84 @@
+--- gdk/x11/gdkdnd-x11.c
++++ gdk/x11/gdkdnd-x11.c
+@@ -683,11 +683,16 @@ is_pointer_within_shape (GdkDisplay *display,
+ GdkDisplayX11 *display_x11 = GDK_DISPLAY_X11 (display);
+ GdkRegion *input_shape;
+
+- child->shape = _xwindow_get_shape (display_x11->xdisplay,
+- child->xid, ShapeBounding);
++ child->shape = NULL;
++ if (gdk_display_supports_shapes (display))
++ child->shape = _xwindow_get_shape (display_x11->xdisplay,
++ child->xid, ShapeBounding);
+ #ifdef ShapeInput
+- input_shape = _xwindow_get_shape (display_x11->xdisplay,
+- child->xid, ShapeInput);
++ input_shape = NULL;
++ if (gdk_display_supports_input_shapes (display))
++ input_shape = _xwindow_get_shape (display_x11->xdisplay,
++ child->xid, ShapeInput);
++
+ if (child->shape && input_shape)
+ {
+ gdk_region_intersect (child->shape, input_shape);
+diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
+index c2c32f0..f32246e 100644
+--- gdk/x11/gdkwindow-x11.c
++++ gdk/x11/gdkwindow-x11.c
+@@ -4659,17 +4659,24 @@ _xwindow_get_shape (Display *xdisplay,
+ shape = NULL;
+ rn = 0;
+
+- xrl = XShapeGetRectangles (xdisplay,
+- window,
+- shape_type, &rn, &ord);
++ /* Note that XShapeGetRectangles returns NULL in two situations:
++ * - the server doesn't support the SHAPE extension
++ * - the shape is empty
++ *
++ * Since we can't discriminate these here, we always return
++ * an empty shape. It is the callers responsibility to check
++ * whether the server supports the SHAPE extensions beforehand.
++ */
++ xrl = XShapeGetRectangles (xdisplay, window, shape_type, &rn, &ord);
+
+- if (xrl == NULL || rn == 0)
++ if (rn == 0)
+ return gdk_region_new (); /* Empty */
+
+ if (ord != YXBanded)
+ {
+ /* This really shouldn't happen with any xserver, as they
+- generally convert regions to YXBanded internally */
++ * generally convert regions to YXBanded internally
++ */
+ g_warning ("non YXBanded shape masks not supported");
+ XFree (xrl);
+ return NULL;
+@@ -4684,10 +4691,10 @@ _xwindow_get_shape (Display *xdisplay,
+ rl[i].height = xrl[i].height;
+ }
+ XFree (xrl);
+-
++
+ shape = _gdk_region_new_from_yxbanded_rects (rl, rn);
+ g_free (rl);
+-
++
+ return shape;
+ }
+
+@@ -4736,10 +4743,10 @@ _gdk_windowing_window_get_input_shape (GdkWindow *window)
+ {
+ #if defined(ShapeInput)
+ if (!GDK_WINDOW_DESTROYED (window) &&
+- gdk_display_supports_shapes (GDK_WINDOW_DISPLAY (window)))
++ gdk_display_supports_input_shapes (GDK_WINDOW_DISPLAY (window)))
+ return _xwindow_get_shape (GDK_WINDOW_XDISPLAY (window),
+- GDK_WINDOW_XID (window),
+- ShapeInput);
++ GDK_WINDOW_XID (window),
++ ShapeInput);
+ #endif
+
+ return NULL;