summaryrefslogtreecommitdiff
path: root/src/ui/menu.c
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2018-03-21 15:52:13 -0400
committerraveit65 <[email protected]>2018-03-22 11:37:10 +0100
commitf6e3326a361afcbdec9aeff018b786bf4e346fea (patch)
tree35afd277cf21e4c1c37cd5685926bcb06dbccc6b /src/ui/menu.c
parent3c2f9856d82f42a42732e1c813ac2ff339077ea6 (diff)
downloadmarco-f6e3326a361afcbdec9aeff018b786bf4e346fea.tar.bz2
marco-f6e3326a361afcbdec9aeff018b786bf4e346fea.tar.xz
Support HiDPI window decorations
Diffstat (limited to 'src/ui/menu.c')
-rw-r--r--src/ui/menu.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ui/menu.c b/src/ui/menu.c
index 1bea9232..aeba64fa 100644
--- a/src/ui/menu.c
+++ b/src/ui/menu.c
@@ -490,11 +490,13 @@ meta_window_menu_new (MetaFrames *frames,
void meta_window_menu_popup(MetaWindowMenu* menu, int root_x, int root_y, int button, guint32 timestamp)
{
GdkPoint* pt = g_new(GdkPoint, 1);
+ gint scale;
g_object_set_data_full(G_OBJECT(menu->menu), "destroy-point", pt, g_free);
- pt->x = root_x;
- pt->y = root_y;
+ scale = gtk_widget_get_scale_factor (menu->menu);
+ pt->x = root_x / scale;
+ pt->y = root_y / scale;
gtk_menu_popup(GTK_MENU (menu->menu), NULL, NULL, popup_position_func, pt, button, timestamp);