]> Pileus Git - ~andy/gtk/blobdiff - gdk/x11/gdkdnd-x11.c
Change FSF Address
[~andy/gtk] / gdk / x11 / gdkdnd-x11.c
index 665941a6b8db28e3672fbd264151c31da934681a..d7ee1000daa0984c0c55e2a9f31e8ae1cf724e9e 100644 (file)
@@ -12,9 +12,7 @@
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  */
 
 /*
@@ -84,6 +82,9 @@ struct _GdkX11DragContext
   GdkDragAction old_action;    /* The last action we sent to the source */
   GdkDragAction old_actions;   /* The last actions we sent to the source */
   GdkDragAction xdnd_actions;  /* What is currently set in XdndActionList */
+  guint version;               /* Xdnd protocol version */
+
+  GSList *window_caches;
 
   Window dest_xid;             /* The last window we looked up */
   Window drop_xid;             /* The (non-proxied) window that is receiving drops */
@@ -92,11 +93,7 @@ struct _GdkX11DragContext
   guint xdnd_have_actions : 1; /* Whether an XdndActionList was provided */
   guint motif_targets_set : 1; /* Whether we've already set motif initiator info */
   guint drag_status       : 4; /* current status of drag */
-
   guint drop_failed       : 1; /* Whether the drop was unsuccessful */
-  guint version;               /* Xdnd protocol version */
-
-  GSList *window_caches;
 };
 
 struct _GdkX11DragContextClass
@@ -663,11 +660,16 @@ is_pointer_within_shape (GdkDisplay    *display,
       GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
       cairo_region_t *input_shape;
 
-      child->shape = _gdk_x11_xwindow_get_shape (display_x11->xdisplay,
-                                                 child->xid, ShapeBounding);
+      child->shape = NULL;
+      if (gdk_display_supports_shapes (display))
+        child->shape = _gdk_x11_xwindow_get_shape (display_x11->xdisplay,
+                                                   child->xid, ShapeBounding);
 #ifdef ShapeInput
-      input_shape = _gdk_x11_xwindow_get_shape (display_x11->xdisplay,
-                                                child->xid, ShapeInput);
+      input_shape = NULL;
+      if (gdk_display_supports_input_shapes (display))
+        input_shape = _gdk_x11_xwindow_get_shape (display_x11->xdisplay,
+                                                  child->xid, ShapeInput);
+
       if (child->shape && input_shape)
         {
           cairo_region_intersect (child->shape, input_shape);
@@ -3193,15 +3195,15 @@ _gdk_x11_window_drag_begin (GdkWindow *window,
   return context;
 }
 
-GdkNativeWindow
+Window
 _gdk_x11_display_get_drag_protocol (GdkDisplay      *display,
-                                    GdkNativeWindow  xid,
+                                    Window           xid,
                                     GdkDragProtocol *protocol,
                                     guint           *version)
 
 {
   GdkWindow *window;
-  GdkNativeWindow retval;
+  Window retval;
 
   base_precache_atoms (display);
 
@@ -3214,10 +3216,10 @@ _gdk_x11_display_get_drag_protocol (GdkDisplay      *display,
           *protocol = GDK_DRAG_PROTO_XDND;
           *version = 5;
           xdnd_precache_atoms (display);
-          GDK_NOTE (DND, g_message ("Entering local Xdnd window %#x\n", xid));
+          GDK_NOTE (DND, g_message ("Entering local Xdnd window %#x\n", (guint) xid));
           return xid;
         }
-      else if (_gdk_x11_display_is_root_window (display, (Window) xid))
+      else if (_gdk_x11_display_is_root_window (display, xid))
         {
           *protocol = GDK_DRAG_PROTO_ROOTWIN;
           GDK_NOTE (DND, g_message ("Entering root window\n"));
@@ -3228,13 +3230,13 @@ _gdk_x11_display_get_drag_protocol (GdkDisplay      *display,
     {
       *protocol = GDK_DRAG_PROTO_XDND;
       xdnd_precache_atoms (display);
-      GDK_NOTE (DND, g_message ("Entering Xdnd window %#x\n", xid));
+      GDK_NOTE (DND, g_message ("Entering Xdnd window %#x\n", (guint) xid));
       return retval;
     }
   else if ((retval = motif_check_dest (display, xid)))
     {
       *protocol = GDK_DRAG_PROTO_MOTIF;
-      GDK_NOTE (DND, g_message ("Entering motif window %#x\n", xid));
+      GDK_NOTE (DND, g_message ("Entering motif window %#x\n", (guint) xid));
       return retval;
     }
   else