[gtk/wip/matthiasc/popup4: 62/105] x11: Drop a gratitious use of gdk_event_get_root_coords
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/matthiasc/popup4: 62/105] x11: Drop a gratitious use of gdk_event_get_root_coords
- Date: Wed, 24 Apr 2019 04:44:46 +0000 (UTC)
commit 42c125e021a1d46345c8d96b64a91c27723f67ab
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Mar 25 00:26:42 2019 -0400
x11: Drop a gratitious use of gdk_event_get_root_coords
We are in the backend, so we can do the translation ourselves.
gdk/x11/gdksurface-x11.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/gdk/x11/gdksurface-x11.c b/gdk/x11/gdksurface-x11.c
index 2fa822f6a8..58e7f2298e 100644
--- a/gdk/x11/gdksurface-x11.c
+++ b/gdk/x11/gdksurface-x11.c
@@ -4532,13 +4532,14 @@ gdk_x11_surface_set_opaque_region (GdkSurface *surface,
static gboolean
gdk_x11_surface_show_window_menu (GdkSurface *surface,
- GdkEvent *event)
+ GdkEvent *event)
{
GdkSurfaceImplX11 *impl = GDK_SURFACE_IMPL_X11 (surface->impl);
GdkDisplay *display = GDK_SURFACE_DISPLAY (surface);
GdkDevice *device;
int device_id;
- double x_root, y_root;
+ double x, y;
+ int x_root, y_root;
XClientMessageEvent xclient = { 0 };
switch ((guint) event->any.type)
@@ -4554,7 +4555,8 @@ gdk_x11_surface_show_window_menu (GdkSurface *surface,
g_intern_static_string ("_GTK_SHOW_WINDOW_MENU")))
return FALSE;
- gdk_event_get_root_coords (event, &x_root, &y_root);
+ gdk_event_get_coords (event, &x, &y);
+ gdk_surface_x11_get_root_coords (surface, x, y, &x_root, &y_root);
device = gdk_event_get_device (event);
g_object_get (G_OBJECT (device),
"device-id", &device_id,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]