Use application/x-rootwindow-drop for root window drops. (#108670, Alex

Sun Jun  8 22:03:09 2003  Owen Taylor  <otaylor@redhat.com>

        * tests/testdnd.c: Use application/x-rootwindow-drop for
        root window drops. (#108670, Alex Larsson)

        * gdk/x11/gdkdnd-x11.c (gdk_drag_motion) gtk/gtkdnd.c (gtk_drag_drop):
        Accept either application/x-rootwin-drop (what GTK+ has always used)
        or application/x-rootwindow-drop (what the XDND standard specifies).
This commit is contained in:
Owen Taylor 2003-06-09 02:13:42 +00:00 committed by Owen Taylor
parent 075958ac88
commit 85d8c33706
8 changed files with 61 additions and 5 deletions

View File

@ -1,3 +1,12 @@
Sun Jun 8 22:03:09 2003 Owen Taylor <otaylor@redhat.com>
* tests/testdnd.c: Use application/x-rootwindow-drop for
root window drops. (#108670, Alex Larsson)
* gdk/x11/gdkdnd-x11.c (gdk_drag_motion) gtk/gtkdnd.c (gtk_drag_drop):
Accept either application/x-rootwin-drop (what GTK+ has always used)
or application/x-rootwindow-drop (what the XDND standard specifies).
Fri Jun 6 11:07:33 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (event_window_still_viewable):

View File

@ -1,3 +1,12 @@
Sun Jun 8 22:03:09 2003 Owen Taylor <otaylor@redhat.com>
* tests/testdnd.c: Use application/x-rootwindow-drop for
root window drops. (#108670, Alex Larsson)
* gdk/x11/gdkdnd-x11.c (gdk_drag_motion) gtk/gtkdnd.c (gtk_drag_drop):
Accept either application/x-rootwin-drop (what GTK+ has always used)
or application/x-rootwindow-drop (what the XDND standard specifies).
Fri Jun 6 11:07:33 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (event_window_still_viewable):

View File

@ -1,3 +1,12 @@
Sun Jun 8 22:03:09 2003 Owen Taylor <otaylor@redhat.com>
* tests/testdnd.c: Use application/x-rootwindow-drop for
root window drops. (#108670, Alex Larsson)
* gdk/x11/gdkdnd-x11.c (gdk_drag_motion) gtk/gtkdnd.c (gtk_drag_drop):
Accept either application/x-rootwin-drop (what GTK+ has always used)
or application/x-rootwindow-drop (what the XDND standard specifies).
Fri Jun 6 11:07:33 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (event_window_still_viewable):

View File

@ -1,3 +1,12 @@
Sun Jun 8 22:03:09 2003 Owen Taylor <otaylor@redhat.com>
* tests/testdnd.c: Use application/x-rootwindow-drop for
root window drops. (#108670, Alex Larsson)
* gdk/x11/gdkdnd-x11.c (gdk_drag_motion) gtk/gtkdnd.c (gtk_drag_drop):
Accept either application/x-rootwin-drop (what GTK+ has always used)
or application/x-rootwindow-drop (what the XDND standard specifies).
Fri Jun 6 11:07:33 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (event_window_still_viewable):

View File

@ -1,3 +1,12 @@
Sun Jun 8 22:03:09 2003 Owen Taylor <otaylor@redhat.com>
* tests/testdnd.c: Use application/x-rootwindow-drop for
root window drops. (#108670, Alex Larsson)
* gdk/x11/gdkdnd-x11.c (gdk_drag_motion) gtk/gtkdnd.c (gtk_drag_drop):
Accept either application/x-rootwin-drop (what GTK+ has always used)
or application/x-rootwindow-drop (what the XDND standard specifies).
Fri Jun 6 11:07:33 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (event_window_still_viewable):

View File

@ -3107,9 +3107,16 @@ gdk_drag_motion (GdkDragContext *context,
case GDK_DRAG_PROTO_ROOTWIN:
{
GdkEvent temp_event;
/* GTK+ traditionally has used application/x-rootwin-drop,
* but the XDND spec specifies x-rootwindow-drop.
*/
GdkAtom target1 = gdk_atom_intern ("application/x-rootwindow-drop", FALSE);
GdkAtom target2 = gdk_atom_intern ("application/x-rootwin-drop", FALSE);
if (g_list_find (context->targets,
GDK_ATOM_TO_POINTER (gdk_atom_intern ("application/x-rootwin-drop", FALSE))))
GDK_ATOM_TO_POINTER (target1)) ||
g_list_find (context->targets,
GDK_ATOM_TO_POINTER (target2)))
context->action = context->suggested_action;
else
context->action = 0;

View File

@ -2791,17 +2791,21 @@ gtk_drag_drop (GtkDragSourceInfo *info,
{
GtkSelectionData selection_data;
GList *tmp_list;
GdkAtom target = gdk_atom_intern ("application/x-rootwin-drop", FALSE);
/* GTK+ traditionally has used application/x-rootwin-drop, but the
* XDND spec specifies x-rootwindow-drop.
*/
GdkAtom target1 = gdk_atom_intern ("application/x-rootwindow-drop", FALSE);
GdkAtom target2 = gdk_atom_intern ("application/x-rootwin-drop", FALSE);
tmp_list = info->target_list->list;
while (tmp_list)
{
GtkTargetPair *pair = tmp_list->data;
if (pair->target == target)
if (pair->target == target1 || pair->target == target2)
{
selection_data.selection = GDK_NONE;
selection_data.target = target;
selection_data.target = pair->target;
selection_data.data = NULL;
selection_data.length = -1;

View File

@ -281,7 +281,7 @@ enum {
static GtkTargetEntry target_table[] = {
{ "STRING", 0, TARGET_STRING },
{ "text/plain", 0, TARGET_STRING },
{ "application/x-rootwin-drop", 0, TARGET_ROOTWIN }
{ "application/x-rootwindow-drop", 0, TARGET_ROOTWIN }
};
static guint n_targets = sizeof(target_table) / sizeof(target_table[0]);