diff options
author | Jonas Ã…dahl <jadahl@gmail.com> | 2016-04-26 15:31:33 +0800 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2016-05-05 15:03:59 -0400 |
commit | 0258c88949a17a0dd5ae93dcec3ba1bc62839577 (patch) | |
tree | 7fa40c522b6f40da544df26458ce5bdc23c41b84 /gdk/x11 | |
parent | 3244d7a138a85ac4f7fb809340f4c86b43b303f5 (diff) | |
download | gtk+-0258c88949a17a0dd5ae93dcec3ba1bc62839577.tar.gz |
gdk/dnd: Don't use default display when getting cursor
Always associate a drag context with a GdkDisplay and use that when
getting a cursor for a given action.
If we don't do this, dragging on a window that doesn't use the default
display will make us use cursors from the wrong display.
https://bugzilla.gnome.org/show_bug.cgi?id=765565
Diffstat (limited to 'gdk/x11')
-rw-r--r-- | gdk/x11/gdkdnd-x11.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gdk/x11/gdkdnd-x11.c b/gdk/x11/gdkdnd-x11.c index c2a69193d2..3d25ea2734 100644 --- a/gdk/x11/gdkdnd-x11.c +++ b/gdk/x11/gdkdnd-x11.c @@ -1705,6 +1705,7 @@ xdnd_enter_filter (GdkXEvent *xev, context_x11 = (GdkX11DragContext *)g_object_new (GDK_TYPE_X11_DRAG_CONTEXT, NULL); context = (GdkDragContext *)context_x11; + context->display = display; context->protocol = GDK_DRAG_PROTO_XDND; context_x11->version = version; @@ -2020,6 +2021,7 @@ _gdk_x11_window_drag_begin (GdkWindow *window, context = (GdkDragContext *) g_object_new (GDK_TYPE_X11_DRAG_CONTEXT, NULL); + context->display = gdk_window_get_display (window); context->is_source = TRUE; context->source_window = window; g_object_ref (window); @@ -3132,6 +3134,6 @@ gdk_x11_drag_context_action_changed (GdkDragContext *context, { GdkCursor *cursor; - cursor = gdk_drag_get_cursor (action); + cursor = gdk_drag_get_cursor (context, action); gdk_drag_context_set_cursor (context, cursor); } |