Commit f3f016d0 authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor

Add gdk_drag_find_window_for_screen(), so that we can interpret x_root /

Mon Oct  7 15:48:44 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkdnd.[ch] gdk/x11/gdkdnd-x11.c: Add
        gdk_drag_find_window_for_screen(), so that we can
        interpret x_root / y_root relative to the correct screen.

        * gdk/gdkdnd.c Makefile.am gdk/x11/gdkdnd-x11.c
        gdk/fb/gdkdnd-fb.c gdk/win32/gdkdnd-win32.c: New file.
        Move gdk_drag_find_window(), gdk_drag_get_protocol() here.

        * gtk/gtkdnd.c: Handle drags between screens; use
        a fallback icon for icons set as windows/pixmaps,
        move the drag icon between displays for icons set as
        pixbufs.

        * gdk/x11/gdkkeys-x11.c (update_keymaps): Fix infinite
        loop from last change.
parent 253458ec
Mon Oct 7 15:48:44 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.[ch] gdk/x11/gdkdnd-x11.c: Add
gdk_drag_find_window_for_screen(), so that we can
interpret x_root / y_root relative to the correct screen.
* gdk/gdkdnd.c Makefile.am gdk/x11/gdkdnd-x11.c
gdk/fb/gdkdnd-fb.c gdk/win32/gdkdnd-win32.c: New file.
Move gdk_drag_find_window(), gdk_drag_get_protocol() here.
* gtk/gtkdnd.c: Handle drags between screens; use
a fallback icon for icons set as windows/pixmaps,
move the drag icon between displays for icons set as
pixbufs.
* gdk/x11/gdkkeys-x11.c (update_keymaps): Fix infinite
loop from last change.
Mon Oct 7 15:10:00 2002 Owen Taylor <otaylor@redhat.com> Mon Oct 7 15:10:00 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdisplay.[ch] gdk/gdkinternals.h * gdk/gdkdisplay.[ch] gdk/gdkinternals.h
......
Mon Oct 7 15:48:44 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.[ch] gdk/x11/gdkdnd-x11.c: Add
gdk_drag_find_window_for_screen(), so that we can
interpret x_root / y_root relative to the correct screen.
* gdk/gdkdnd.c Makefile.am gdk/x11/gdkdnd-x11.c
gdk/fb/gdkdnd-fb.c gdk/win32/gdkdnd-win32.c: New file.
Move gdk_drag_find_window(), gdk_drag_get_protocol() here.
* gtk/gtkdnd.c: Handle drags between screens; use
a fallback icon for icons set as windows/pixmaps,
move the drag icon between displays for icons set as
pixbufs.
* gdk/x11/gdkkeys-x11.c (update_keymaps): Fix infinite
loop from last change.
Mon Oct 7 15:10:00 2002 Owen Taylor <otaylor@redhat.com> Mon Oct 7 15:10:00 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdisplay.[ch] gdk/gdkinternals.h * gdk/gdkdisplay.[ch] gdk/gdkinternals.h
......
Mon Oct 7 15:48:44 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.[ch] gdk/x11/gdkdnd-x11.c: Add
gdk_drag_find_window_for_screen(), so that we can
interpret x_root / y_root relative to the correct screen.
* gdk/gdkdnd.c Makefile.am gdk/x11/gdkdnd-x11.c
gdk/fb/gdkdnd-fb.c gdk/win32/gdkdnd-win32.c: New file.
Move gdk_drag_find_window(), gdk_drag_get_protocol() here.
* gtk/gtkdnd.c: Handle drags between screens; use
a fallback icon for icons set as windows/pixmaps,
move the drag icon between displays for icons set as
pixbufs.
* gdk/x11/gdkkeys-x11.c (update_keymaps): Fix infinite
loop from last change.
Mon Oct 7 15:10:00 2002 Owen Taylor <otaylor@redhat.com> Mon Oct 7 15:10:00 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdisplay.[ch] gdk/gdkinternals.h * gdk/gdkdisplay.[ch] gdk/gdkinternals.h
......
Mon Oct 7 15:48:44 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.[ch] gdk/x11/gdkdnd-x11.c: Add
gdk_drag_find_window_for_screen(), so that we can
interpret x_root / y_root relative to the correct screen.
* gdk/gdkdnd.c Makefile.am gdk/x11/gdkdnd-x11.c
gdk/fb/gdkdnd-fb.c gdk/win32/gdkdnd-win32.c: New file.
Move gdk_drag_find_window(), gdk_drag_get_protocol() here.
* gtk/gtkdnd.c: Handle drags between screens; use
a fallback icon for icons set as windows/pixmaps,
move the drag icon between displays for icons set as
pixbufs.
* gdk/x11/gdkkeys-x11.c (update_keymaps): Fix infinite
loop from last change.
Mon Oct 7 15:10:00 2002 Owen Taylor <otaylor@redhat.com> Mon Oct 7 15:10:00 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdisplay.[ch] gdk/gdkinternals.h * gdk/gdkdisplay.[ch] gdk/gdkinternals.h
......
Mon Oct 7 15:48:44 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.[ch] gdk/x11/gdkdnd-x11.c: Add
gdk_drag_find_window_for_screen(), so that we can
interpret x_root / y_root relative to the correct screen.
* gdk/gdkdnd.c Makefile.am gdk/x11/gdkdnd-x11.c
gdk/fb/gdkdnd-fb.c gdk/win32/gdkdnd-win32.c: New file.
Move gdk_drag_find_window(), gdk_drag_get_protocol() here.
* gtk/gtkdnd.c: Handle drags between screens; use
a fallback icon for icons set as windows/pixmaps,
move the drag icon between displays for icons set as
pixbufs.
* gdk/x11/gdkkeys-x11.c (update_keymaps): Fix infinite
loop from last change.
Mon Oct 7 15:10:00 2002 Owen Taylor <otaylor@redhat.com> Mon Oct 7 15:10:00 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdisplay.[ch] gdk/gdkinternals.h * gdk/gdkdisplay.[ch] gdk/gdkinternals.h
......
Mon Oct 7 15:48:44 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.[ch] gdk/x11/gdkdnd-x11.c: Add
gdk_drag_find_window_for_screen(), so that we can
interpret x_root / y_root relative to the correct screen.
* gdk/gdkdnd.c Makefile.am gdk/x11/gdkdnd-x11.c
gdk/fb/gdkdnd-fb.c gdk/win32/gdkdnd-win32.c: New file.
Move gdk_drag_find_window(), gdk_drag_get_protocol() here.
* gtk/gtkdnd.c: Handle drags between screens; use
a fallback icon for icons set as windows/pixmaps,
move the drag icon between displays for icons set as
pixbufs.
* gdk/x11/gdkkeys-x11.c (update_keymaps): Fix infinite
loop from last change.
Mon Oct 7 15:10:00 2002 Owen Taylor <otaylor@redhat.com> Mon Oct 7 15:10:00 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdisplay.[ch] gdk/gdkinternals.h * gdk/gdkdisplay.[ch] gdk/gdkinternals.h
......
...@@ -129,6 +129,7 @@ gdk_c_sources = @STRIP_BEGIN@ \ ...@@ -129,6 +129,7 @@ gdk_c_sources = @STRIP_BEGIN@ \
gdkcolor.c \ gdkcolor.c \
gdkcursor.c \ gdkcursor.c \
gdkdisplay.c \ gdkdisplay.c \
gdkdnd.c \
gdkdraw.c \ gdkdraw.c \
gdkevents.c \ gdkevents.c \
gdkfont.c \ gdkfont.c \
......
...@@ -102,20 +102,28 @@ GdkAtom gdk_drag_get_selection (GdkDragContext *context); ...@@ -102,20 +102,28 @@ GdkAtom gdk_drag_get_selection (GdkDragContext *context);
GdkDragContext * gdk_drag_begin (GdkWindow *window, GdkDragContext * gdk_drag_begin (GdkWindow *window,
GList *targets); GList *targets);
guint32 gdk_drag_get_protocol_for_display (GdkDisplay *display, guint32 gdk_drag_get_protocol_for_display (GdkDisplay *display,
guint32 xid, guint32 xid,
GdkDragProtocol *protocol); GdkDragProtocol *protocol);
void gdk_drag_find_window_for_screen (GdkDragContext *context,
GdkWindow *drag_window,
GdkScreen *screen,
gint x_root,
gint y_root,
GdkWindow **dest_window,
GdkDragProtocol *protocol);
#ifndef GDK_MULTIHEAD_SAFE #ifndef GDK_MULTIHEAD_SAFE
guint32 gdk_drag_get_protocol (guint32 xid, guint32 gdk_drag_get_protocol (guint32 xid,
GdkDragProtocol *protocol); GdkDragProtocol *protocol);
void gdk_drag_find_window (GdkDragContext *context,
GdkWindow *drag_window,
gint x_root,
gint y_root,
GdkWindow **dest_window,
GdkDragProtocol *protocol);
#endif /* GDK_MULTIHEAD_SAFE */ #endif /* GDK_MULTIHEAD_SAFE */
void gdk_drag_find_window (GdkDragContext *context,
GdkWindow *drag_window,
gint x_root,
gint y_root,
GdkWindow **dest_window,
GdkDragProtocol *protocol);
gboolean gdk_drag_motion (GdkDragContext *context, gboolean gdk_drag_motion (GdkDragContext *context,
GdkWindow *dest_window, GdkWindow *dest_window,
GdkDragProtocol protocol, GdkDragProtocol protocol,
......
...@@ -378,8 +378,9 @@ gdk_drag_begin (GdkWindow *window, ...@@ -378,8 +378,9 @@ gdk_drag_begin (GdkWindow *window,
} }
guint32 guint32
gdk_drag_get_protocol (guint32 xid, gdk_drag_get_protocol_for_display (GdkDisplay *display,
GdkDragProtocol *protocol) guint32 xid,
GdkDragProtocol *protocol)
{ {
GdkWindow *window; GdkWindow *window;
...@@ -444,12 +445,13 @@ get_toplevel_window_at (GdkWindow *ignore, ...@@ -444,12 +445,13 @@ get_toplevel_window_at (GdkWindow *ignore,
void void
gdk_drag_find_window (GdkDragContext *context, gdk_drag_find_window_for_screen (GdkDragContext *context,
GdkWindow *drag_window, GdkWindow *drag_window,
gint x_root, GdkScreen *screen,
gint y_root, gint x_root,
GdkWindow **dest_window, gint y_root,
GdkDragProtocol *protocol) GdkWindow **dest_window,
GdkDragProtocol *protocol)
{ {
GdkWindow *dest; GdkWindow *dest;
......
...@@ -1298,8 +1298,9 @@ gdk_drag_begin (GdkWindow *window, ...@@ -1298,8 +1298,9 @@ gdk_drag_begin (GdkWindow *window,
} }
guint32 guint32
gdk_drag_get_protocol (guint32 xid, gdk_drag_get_protocol_for_display (GdkDisplay *display,
GdkDragProtocol *protocol) guint32 xid,
GdkDragProtocol *protocol)
{ {
GdkWindow *window; GdkWindow *window;
...@@ -1317,12 +1318,13 @@ gdk_drag_get_protocol (guint32 xid, ...@@ -1317,12 +1318,13 @@ gdk_drag_get_protocol (guint32 xid,
} }
void void
gdk_drag_find_window (GdkDragContext *context, gdk_drag_find_window_for_screen (GdkDragContext *context,
GdkWindow *drag_window, GdkWindow *drag_window,
gint x_root, GdkScreen *screen,
gint y_root, gint x_root,
GdkWindow **dest_window, gint y_root,
GdkDragProtocol *protocol) GdkWindow **dest_window,
GdkDragProtocol *protocol)
{ {
HWND recipient; HWND recipient;
POINT pt; POINT pt;
......
...@@ -83,7 +83,7 @@ struct _GdkDragContextPrivateX11 { ...@@ -83,7 +83,7 @@ struct _GdkDragContextPrivateX11 {
guint motif_targets_set : 1; /* Whether we've already set motif initiator info */ guint motif_targets_set : 1; /* Whether we've already set motif initiator info */
guint drag_status : 4; /* current status of drag */ guint drag_status : 4; /* current status of drag */
GdkWindowCache *window_cache; GSList *window_caches;
}; };
#define PRIVATE_DATA(context) ((GdkDragContextPrivateX11 *) GDK_DRAG_CONTEXT (context)->windowing_data) #define PRIVATE_DATA(context) ((GdkDragContextPrivateX11 *) GDK_DRAG_CONTEXT (context)->windowing_data)
...@@ -188,6 +188,7 @@ gdk_drag_context_finalize (GObject *object) ...@@ -188,6 +188,7 @@ gdk_drag_context_finalize (GObject *object)
{ {
GdkDragContext *context = GDK_DRAG_CONTEXT (object); GdkDragContext *context = GDK_DRAG_CONTEXT (object);
GdkDragContextPrivateX11 *private = PRIVATE_DATA (context); GdkDragContextPrivateX11 *private = PRIVATE_DATA (context);
GSList *tmp_list;
g_list_free (context->targets); g_list_free (context->targets);
...@@ -202,9 +203,10 @@ gdk_drag_context_finalize (GObject *object) ...@@ -202,9 +203,10 @@ gdk_drag_context_finalize (GObject *object)
if (context->dest_window) if (context->dest_window)
g_object_unref (context->dest_window); g_object_unref (context->dest_window);
if (private->window_cache) for (tmp_list = private->window_caches; tmp_list; tmp_list = tmp_list->next)
gdk_window_cache_destroy (private->window_cache); gdk_window_cache_destroy (tmp_list->data);
g_slist_free (private->window_caches);
contexts = g_list_remove (contexts, context); contexts = g_list_remove (contexts, context);
...@@ -2840,22 +2842,38 @@ gdk_drag_get_protocol_for_display (GdkDisplay *display, ...@@ -2840,22 +2842,38 @@ gdk_drag_get_protocol_for_display (GdkDisplay *display,
return None; return None;
} }
guint32 static GdkWindowCache *
gdk_drag_get_protocol (guint32 xid, drag_context_find_window_cache (GdkDragContext *context,
GdkDragProtocol *protocol) GdkScreen *screen)
{ {
return gdk_drag_get_protocol_for_display (gdk_display_get_default (), xid, protocol); GdkDragContextPrivateX11 *private = PRIVATE_DATA (context);
GSList *tmp_list;
GdkWindowCache *cache;
for (tmp_list = private->window_caches; tmp_list; tmp_list = tmp_list->next)
{
cache = tmp_list->data;
if (cache->screen == screen)
return cache;
}
cache = gdk_window_cache_new (screen);
private->window_caches = g_slist_prepend (private->window_caches, cache);
return cache;
} }
void void
gdk_drag_find_window (GdkDragContext *context, gdk_drag_find_window_for_screen (GdkDragContext *context,
GdkWindow *drag_window, GdkWindow *drag_window,
gint x_root, GdkScreen *screen,
gint y_root, gint x_root,
GdkWindow **dest_window, gint y_root,
GdkDragProtocol *protocol) GdkWindow **dest_window,
GdkDragProtocol *protocol)
{ {
GdkDragContextPrivateX11 *private = PRIVATE_DATA (context); GdkDragContextPrivateX11 *private = PRIVATE_DATA (context);
GdkWindowCache *window_cache;
GdkDisplay *display; GdkDisplay *display;
Window dest; Window dest;
...@@ -2863,10 +2881,9 @@ gdk_drag_find_window (GdkDragContext *context, ...@@ -2863,10 +2881,9 @@ gdk_drag_find_window (GdkDragContext *context,
display = GDK_WINDOW_DISPLAY (context->source_window); display = GDK_WINDOW_DISPLAY (context->source_window);
if (!private->window_cache) window_cache = drag_context_find_window_cache (context, screen);
private->window_cache = gdk_window_cache_new (gdk_drawable_get_screen (context->source_window));
dest = get_client_window_at_coords (private->window_cache, dest = get_client_window_at_coords (window_cache,
drag_window ? drag_window ?
GDK_DRAWABLE_XID (drag_window) : None, GDK_DRAWABLE_XID (drag_window) : None,
x_root, y_root); x_root, y_root);
......
...@@ -303,7 +303,7 @@ update_keymaps (GdkKeymapX11 *keymap_x11) ...@@ -303,7 +303,7 @@ update_keymaps (GdkKeymapX11 *keymap_x11)
*/ */
if (mask == GDK_CONTROL_MASK || mask == GDK_SHIFT_MASK || if (mask == GDK_CONTROL_MASK || mask == GDK_SHIFT_MASK ||
mask == GDK_LOCK_MASK || mask == GDK_MOD1_MASK) mask == GDK_LOCK_MASK || mask == GDK_MOD1_MASK)
continue; goto next;
while (j < keymap_x11->keysyms_per_keycode) while (j < keymap_x11->keysyms_per_keycode)
{ {
...@@ -318,7 +318,8 @@ update_keymaps (GdkKeymapX11 *keymap_x11) ...@@ -318,7 +318,8 @@ update_keymaps (GdkKeymapX11 *keymap_x11)
++j; ++j;
} }
} }
next:
++i; ++i;
} }
} }
......
...@@ -83,6 +83,7 @@ struct _GtkDragSourceInfo ...@@ -83,6 +83,7 @@ struct _GtkDragSourceInfo
GdkDragAction possible_actions; /* Actions allowed by source */ GdkDragAction possible_actions; /* Actions allowed by source */
GdkDragContext *context; /* drag context */ GdkDragContext *context; /* drag context */
GtkWidget *icon_window; /* Window for drag */ GtkWidget *icon_window; /* Window for drag */
GtkWidget *fallback_icon; /* Window for drag used on other screens */
GtkWidget *ipc_widget; /* GtkInvisible for grab, message passing */ GtkWidget *ipc_widget; /* GtkInvisible for grab, message passing */
GdkCursor *cursor; /* Cursor for drag */ GdkCursor *cursor; /* Cursor for drag */
gint hot_x, hot_y; /* Hot spot for drag */ gint hot_x, hot_y; /* Hot spot for drag */
...@@ -93,6 +94,7 @@ struct _GtkDragSourceInfo ...@@ -93,6 +94,7 @@ struct _GtkDragSourceInfo
gint start_x, start_y; /* Initial position */ gint start_x, start_y; /* Initial position */
gint cur_x, cur_y; /* Current Position */ gint cur_x, cur_y; /* Current Position */
GdkScreen *cur_screen; /* Current screen for pointer */
guint32 grab_time; /* timestamp for initial grab */ guint32 grab_time; /* timestamp for initial grab */
GList *selections; /* selections we've claimed */ GList *selections; /* selections we've claimed */
...@@ -101,9 +103,9 @@ struct _GtkDragSourceInfo ...@@ -101,9 +103,9 @@ struct _GtkDragSourceInfo
guint drop_timeout; /* Timeout for aborting drop */ guint drop_timeout; /* Timeout for aborting drop */
guint destroy_icon : 1; /* If true, destroy icon_window guint destroy_icon : 1; /* If true, destroy icon_window
*/ */
guint have_grab : 1; /* Do we still have the pointer grab guint have_grab : 1; /* Do we still have the pointer grab
*/ */
}; };
struct _GtkDragDestSite struct _GtkDragDestSite
...@@ -250,6 +252,7 @@ static gint gtk_drag_anim_timeout (gpointer data); ...@@ -250,6 +252,7 @@ static gint gtk_drag_anim_timeout (gpointer data);
static void gtk_drag_remove_icon (GtkDragSourceInfo *info); static void gtk_drag_remove_icon (GtkDragSourceInfo *info);
static void gtk_drag_source_info_destroy (GtkDragSourceInfo *info); static void gtk_drag_source_info_destroy (GtkDragSourceInfo *info);
static void gtk_drag_update (GtkDragSourceInfo *info, static void gtk_drag_update (GtkDragSourceInfo *info,
GdkScreen *screen,
gint x_root, gint x_root,
gint y_root, gint y_root,
GdkEvent *event); GdkEvent *event);
...@@ -361,6 +364,23 @@ static const gint n_drag_cursors = sizeof (drag_cursors) / sizeof (drag_cursors[ ...@@ -361,6 +364,23 @@ static const gint n_drag_cursors = sizeof (drag_cursors) / sizeof (drag_cursors[
* Utility functions * * Utility functions *
*********************/ *********************/
static gboolean
set_can_change_screen (GtkWidget *widget,
gboolean can_change_screen)
{
can_change_screen = can_change_screen != FALSE;
g_object_set_data (G_OBJECT (widget), "gtk-dnd-can-change-screen",
GUINT_TO_POINTER (can_change_screen));
}
static gboolean
get_can_change_screen (GtkWidget *widget)
{
return g_object_get_data (G_OBJECT (widget), "gtk-dnd-can-change-screen") != NULL;
}
/************************************************************* /*************************************************************
* gtk_drag_get_ipc_widget: * gtk_drag_get_ipc_widget:
* Return a invisible, off-screen, override-redirect * Return a invisible, off-screen, override-redirect
...@@ -1607,11 +1627,12 @@ gtk_drag_dest_motion (GtkWidget *widget, ...@@ -1607,11 +1627,12 @@ gtk_drag_dest_motion (GtkWidget *widget,
} }
else else
{ {
gdk_drag_find_window (info->proxy_source->context, gdk_drag_find_window_for_screen (info->proxy_source->context,
NULL, NULL,
current_event->dnd.x_root, gdk_drawable_get_screen (current_event->dnd.window),
current_event->dnd.y_root, current_event->dnd.x_root,
&dest_window, &proto); current_event->dnd.y_root,
&dest_window, &proto);
} }
gdk_drag_motion (info->proxy_source->context, gdk_drag_motion (info->proxy_source->context,
...@@ -1727,11 +1748,12 @@ gtk_drag_dest_drop (GtkWidget *widget, ...@@ -1727,11 +1748,12 @@ gtk_drag_dest_drop (GtkWidget *widget,
} }
else else
{ {
gdk_drag_find_window (info->proxy_source->context, gdk_drag_find_window_for_screen (info->proxy_source->context,
NULL, NULL,
current_event->dnd.x_root, gdk_drawable_get_screen (current_event->dnd.window),
current_event->dnd.y_root, current_event->dnd.x_root,
&dest_window, &proto); current_event->dnd.y_root,
&dest_window, &proto);
} }
gdk_drag_motion (info->proxy_source->context, gdk_drag_motion (info->proxy_source->context,
...@@ -1862,13 +1884,14 @@ gtk_drag_begin (GtkWidget *widget, ...@@ -1862,13 +1884,14 @@ gtk_drag_begin (GtkWidget *widget,
*/ */
if (event && event->type == GDK_MOTION_NOTIFY) if (event && event->type == GDK_MOTION_NOTIFY)
{ {
info->cur_screen = gtk_widget_get_screen (widget);
info->cur_x = event->motion.x_root; info->cur_x = event->motion.x_root;
info->cur_y = event->motion.y_root; info->cur_y = event->motion.y_root;
} }
else else
{ {
gdk_window_get_pointer (gtk_widget_get_root_window (widget), gdk_display_get_pointer (gtk_widget_get_display (widget),
&info->cur_x, &info->cur_y, NULL); &info->cur_screen, &info->cur_x, &info->cur_y, NULL);
} }
gtk_signal_emit_by_name (GTK_OBJECT (widget), "drag_begin", gtk_signal_emit_by_name (GTK_OBJECT (widget), "drag_begin",
...@@ -2126,6 +2149,89 @@ gtk_drag_source_set_icon_stock (GtkWidget *widget, ...@@ -2126,6 +2149,89 @@ gtk_drag_source_set_icon_stock (GtkWidget *widget,
site->icon_data.stock.stock_id = g_strdup (stock_id); site->icon_data.stock.stock_id = g_strdup (stock_id);
} }
static void
gtk_drag_get_icon (GtkDragSourceInfo *info,
GtkWidget **icon_window,
gint *hot_x,
gint *hot_y)
{
if (get_can_change_screen (info->icon_window))
gtk_window_set_screen (GTK_WINDOW (info->icon_window),
info->cur_screen);
if (gtk_widget_get_screen (info->icon_window) != info->cur_screen)
{
if (!info->fallback_icon)
{
gint save_hot_x, save_hot_y;
gboolean save_destroy_icon;
GtkWidget *save_icon_window;
/* HACK to get the appropriate icon
*/
save_icon_window = info->icon_window;
save_hot_x = info->hot_x;
save_hot_y = info->hot_x;
save_destroy_icon = info->destroy_icon;
info->icon_window = NULL;
gtk_drag_set_icon_default (info->context);
info->fallback_icon = info->icon_window;
info->icon_window = save_icon_window;
info->hot_x = save_hot_x;
info->hot_y = save_hot_y;
info->destroy_icon = save_destroy_icon;
}
gtk_widget_hide (info->icon_window);
*icon_window = info->fallback_icon;
gtk_window_set_screen (GTK_WINDOW (*icon_window), info->cur_screen);