Only register application/x-rootwindow-drop on X11
application/x-rootwindow-drop is not useful anywhere else, so put it under #ifdef GDK_WINDOWING_X11 On W32 this prevents toplevels from automatically becoming valid drop targets with a useless drop type. https://bugzilla.gnome.org/show_bug.cgi?id=786509
This commit is contained in:
parent
87103b9a14
commit
2cc7a9c034
@ -275,9 +275,11 @@ struct _GtkWindowPrivate
|
||||
GtkCssNode *decoration_node;
|
||||
};
|
||||
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
static const GtkTargetEntry dnd_dest_targets [] = {
|
||||
{ "application/x-rootwindow-drop", 0, 0 },
|
||||
};
|
||||
#endif
|
||||
|
||||
enum {
|
||||
SET_FOCUS,
|
||||
@ -1719,10 +1721,12 @@ gtk_window_init (GtkWindow *window)
|
||||
|
||||
priv->scale = gtk_widget_get_scale_factor (widget);
|
||||
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
gtk_drag_dest_set (GTK_WIDGET (window),
|
||||
GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_DROP,
|
||||
dnd_dest_targets, G_N_ELEMENTS (dnd_dest_targets),
|
||||
GDK_ACTION_MOVE);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user