summarylogtreecommitdiffstats
path: root/0001-wayland-xdg-shell-Correct-window-menu-position-in-lo.patch
blob: 47390ba3a7fbcfea86d9503bc677cdf869d316ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
From da01a3eaffe01ae2c3ea826171057548c7973c39 Mon Sep 17 00:00:00 2001
Message-Id: <da01a3eaffe01ae2c3ea826171057548c7973c39.1553635567.git.jan.steffens@gmail.com>
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
Date: Tue, 26 Mar 2019 22:24:44 +0100
Subject: [PATCH] wayland/xdg-shell: Correct window menu position in logical
 layout mode

Fixes https://gitlab.gnome.org/GNOME/mutter/issues/527
---
 src/wayland/meta-wayland-legacy-xdg-shell.c | 2 +-
 src/wayland/meta-wayland-xdg-shell.c        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/wayland/meta-wayland-legacy-xdg-shell.c b/src/wayland/meta-wayland-legacy-xdg-shell.c
index 1523481d4..823064177 100644
--- a/src/wayland/meta-wayland-legacy-xdg-shell.c
+++ b/src/wayland/meta-wayland-legacy-xdg-shell.c
@@ -258,7 +258,7 @@ zxdg_toplevel_v6_show_window_menu (struct wl_client   *client,
   if (!meta_wayland_seat_get_grab_info (seat, surface, serial, FALSE, NULL, NULL))
     return;
 
-  monitor_scale = window->monitor->scale;
+  monitor_scale = meta_window_wayland_get_geometry_scale (window);
   meta_window_show_menu (window, META_WINDOW_MENU_WM,
                          window->buffer_rect.x + (x * monitor_scale),
                          window->buffer_rect.y + (y * monitor_scale));
diff --git a/src/wayland/meta-wayland-xdg-shell.c b/src/wayland/meta-wayland-xdg-shell.c
index d747f5c07..fa0207a03 100644
--- a/src/wayland/meta-wayland-xdg-shell.c
+++ b/src/wayland/meta-wayland-xdg-shell.c
@@ -264,7 +264,7 @@ xdg_toplevel_show_window_menu (struct wl_client   *client,
   if (!meta_wayland_seat_get_grab_info (seat, surface, serial, FALSE, NULL, NULL))
     return;
 
-  monitor_scale = window->monitor->scale;
+  monitor_scale = meta_window_wayland_get_geometry_scale (window);
   meta_window_show_menu (window, META_WINDOW_MENU_WM,
                          window->buffer_rect.x + (x * monitor_scale),
                          window->buffer_rect.y + (y * monitor_scale));
-- 
2.21.0