[gtk+] gdkwindow-x11: Pass through the x/y coordinates to _GTK_SHOW_WINDOW_MENU



commit 6c3712599cd7fffdbf000815752fb2c00f003938
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Thu May 22 10:47:58 2014 -0400

    gdkwindow-x11: Pass through the x/y coordinates to _GTK_SHOW_WINDOW_MENU
    
    We accept these now.

 gdk/x11/gdkwindow-x11.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index d3120a6..6926351 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -5709,6 +5709,7 @@ gdk_x11_window_show_window_menu (GdkWindow *window,
   GdkDisplay *display = GDK_WINDOW_DISPLAY (window);
   GdkDevice *device;
   int device_id;
+  double x_root, y_root;
   XClientMessageEvent xclient = { 0 };
 
   switch (event->type)
@@ -5726,6 +5727,8 @@ gdk_x11_window_show_window_menu (GdkWindow *window,
 
   device = gdk_event_get_device (event);
 
+  gdk_event_get_root_coords (event, &x_root, &y_root);
+
   g_object_get (G_OBJECT (device),
                 "device-id", &device_id,
                 NULL);
@@ -5734,6 +5737,8 @@ gdk_x11_window_show_window_menu (GdkWindow *window,
   xclient.window = GDK_WINDOW_XID (window);
   xclient.message_type = gdk_x11_get_xatom_by_name_for_display (display, "_GTK_SHOW_WINDOW_MENU");
   xclient.data.l[0] = device_id;
+  xclient.data.l[1] = x_root;
+  xclient.data.l[2] = y_root;
   xclient.format = 32;
 
   XSendEvent (GDK_DISPLAY_XDISPLAY (display), GDK_WINDOW_XROOTWIN (window), False,


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