summaryrefslogtreecommitdiff
path: root/src/core/window.c
diff options
context:
space:
mode:
authorAlberts Muktupāvels <alberts.muktupavels@gmail.com>2019-08-14 15:19:37 +0300
committerAlberts Muktupāvels <alberts.muktupavels@gmail.com>2019-08-14 15:19:37 +0300
commit96f78cbaaa7f927a81a7abcfc553272ce2859df1 (patch)
treec2defa0241fb0c94e3a1a72403a700b6b813f68b /src/core/window.c
parentaf0bbded4856cf7c81dc81b8313b4034f5b19d06 (diff)
downloadmetacity-96f78cbaaa7f927a81a7abcfc553272ce2859df1.tar.gz
window: add support for _GTK_SHOW_WINDOW_MENU
Based on mutter commits: https://gitlab.gnome.org/GNOME/mutter/commit/50b81fe4b9623dd34a1d9 https://gitlab.gnome.org/GNOME/mutter/commit/6513cbb470a145217f524 https://gitlab.gnome.org/GNOME/metacity/issues/5
Diffstat (limited to 'src/core/window.c')
-rw-r--r--src/core/window.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/core/window.c b/src/core/window.c
index 8a9d3fad..a8fd3b8e 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -5825,6 +5825,22 @@ meta_window_client_message (MetaWindow *window,
meta_window_update_fullscreen_monitors (window, top, bottom, left, right);
}
+ else if (event->xclient.message_type ==
+ display->atom__GTK_SHOW_WINDOW_MENU)
+ {
+ GdkRectangle rect;
+ guint32 timestamp;
+
+ /* l[0] is device_id, which we don't use */
+ rect.x = event->xclient.data.l[1];
+ rect.y = event->xclient.data.l[2];
+ rect.width = 0;
+ rect.height = 0;
+
+ timestamp = meta_display_get_current_time_roundtrip (display);
+
+ meta_window_show_menu (window, &rect, timestamp);
+ }
return FALSE;
}