--- gtk+2.0-2.24.8/gdk/x11/gdkdnd-x11.c.orig	2011-11-11 02:38:03.000000000 +0900
+++ gtk+2.0-2.24.8/gdk/x11/gdkdnd-x11.c	2012-01-03 22:41:13.000000000 +0900
@@ -683,11 +683,16 @@ is_pointer_within_shape (GdkDisplay    *
       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);
--- gtk+2.0-2.24.8/gdk/x11/gdkwindow-x11.c.orig	2011-11-11 02:38:03.000000000 +0900
+++ gtk+2.0-2.24.8/gdk/x11/gdkwindow-x11.c	2012-01-03 21:03:16.000000000 +0900
@@ -4663,7 +4663,7 @@ _xwindow_get_shape (Display *xdisplay,
 			     window,
 			     shape_type, &rn, &ord);
 
-  if (xrl == NULL || rn == 0)
+  if (rn == 0)
     return gdk_region_new (); /* Empty */
 
   if (ord != YXBanded)
@@ -4736,7 +4736,7 @@ _gdk_windowing_window_get_input_shape (G
 {
 #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);
