Commit 79e7934e authored by Matthias Clasen's avatar Matthias Clasen

Fix mispositioned window menu in hi-dpi

We always want to send the position in device pixels,
so apply the window scale before sending them out.

https://bugzilla.gnome.org/show_bug.cgi?id=738955
parent ea8a2815
......@@ -5685,6 +5685,7 @@ static gboolean
gdk_x11_window_show_window_menu (GdkWindow *window,
GdkEvent *event)
{
GdkWindowImplX11 *impl = GDK_WINDOW_IMPL_X11 (window->impl);
GdkDisplay *display = GDK_WINDOW_DISPLAY (window);
GdkDevice *device;
int device_id;
......@@ -5717,8 +5718,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.data.l[1] = x_root * impl->window_scale;
xclient.data.l[2] = y_root * impl->window_scale;
xclient.format = 32;
XSendEvent (GDK_DISPLAY_XDISPLAY (display), GDK_WINDOW_XROOTWIN (window), False,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment