* 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/>.
*/
/*
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 */
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
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);
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);
*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"));
{
*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