[gtk+/gtk-3-22] x11: Fix initial drag cursors
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-22] x11: Fix initial drag cursors
- Date: Sat, 26 Aug 2017 23:59:03 +0000 (UTC)
commit 888559235fb5e27a4aa6ce6e69739d1a89693671
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Aug 26 18:01:17 2017 -0400
x11: Fix initial drag cursors
Under X, we were not setting the right drag cursor initially,
because at current_action == action == 0, initially. Fix this
by explicitly using the right cursor when grabbing.
gdk/x11/gdkdnd-x11.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gdk/x11/gdkdnd-x11.c b/gdk/x11/gdkdnd-x11.c
index 6a5e7c0..4e5fd27 100644
--- a/gdk/x11/gdkdnd-x11.c
+++ b/gdk/x11/gdkdnd-x11.c
@@ -2678,6 +2678,7 @@ drag_context_grab (GdkDragContext *context)
GdkWindow *root;
GdkSeat *seat;
gint keycode, i;
+ GdkCursor *cursor;
if (!x11_context->ipc_window)
return FALSE;
@@ -2692,6 +2693,9 @@ drag_context_grab (GdkDragContext *context)
#endif
capabilities = GDK_SEAT_CAPABILITY_ALL;
+ cursor = gdk_drag_get_cursor (context, x11_context->current_action);
+ g_set_object (&x11_context->cursor, cursor);
+
if (gdk_seat_grab (seat, x11_context->ipc_window,
capabilities, FALSE,
x11_context->cursor, NULL, NULL, NULL) != GDK_GRAB_SUCCESS)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]