[gtk+/wayland-selections: 11/17] gtkdnd: set root coordinates to 0, 0 for widget lookup



commit aa91069c2544274e9da2ff45a68300c81e4135f3
Author: Carlos Garnacho <carlosg gnome org>
Date:   Thu Aug 21 22:10:18 2014 +0200

    gtkdnd: set root coordinates to 0,0 for widget lookup
    
    Each window is in its local "root" coordinate system, so make sure
    we use 0, 0 for DnD widget lookup.

 gtk/gtkdnd.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c
index cc59591..97045dd 100644
--- a/gtk/gtkdnd.c
+++ b/gtk/gtkdnd.c
@@ -39,6 +39,10 @@
 #endif
 #endif
 
+#ifdef GDK_WINDOWING_WAYLAND
+#include <gdk/wayland/gdkwayland.h>
+#endif
+
 #include "gtkdnd.h"
 #include "gtkiconhelperprivate.h"
 #include "gtkicontheme.h"
@@ -1751,6 +1755,11 @@ _gtk_drag_dest_handle_event (GtkWidget *toplevel,
           gdk_window_get_origin (window, &tx, &ty);
         else
 #endif /* GDK_WINDOWING_X11 */
+#ifdef GDK_WINDOWING_WAYLAND
+        if (GDK_IS_WAYLAND_DISPLAY (gtk_widget_get_display (toplevel)))
+          tx = ty = 0;
+        else
+#endif /* GDK_WINDOWING_WAYLAND */
           gdk_window_get_position (window, &tx, &ty);
 
         found = gtk_drag_find_widget (toplevel,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]