summaryrefslogtreecommitdiff
path: root/src/core/window.c
diff options
context:
space:
mode:
authorBjörn Weber <[email protected]>2017-12-29 18:52:45 +0100
committerraveit65 <[email protected]>2018-01-02 10:37:02 +0100
commit2cebadddb41ba4e5c2063ca9ce31fc5ed14300c1 (patch)
tree051efa62742f7247afa7b40618baaf0d25fa9e96 /src/core/window.c
parent52701a81d82cd89525ed883cb046f11f384c8d6c (diff)
downloadmarco-2cebadddb41ba4e5c2063ca9ce31fc5ed14300c1.tar.bz2
marco-2cebadddb41ba4e5c2063ca9ce31fc5ed14300c1.tar.xz
Add support for gtk3 _GTK_SHOW_WINDOW_MENU event
Diffstat (limited to 'src/core/window.c')
-rw-r--r--src/core/window.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/core/window.c b/src/core/window.c
index 530bc407..eec909aa 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -5399,6 +5399,27 @@ 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)
+ {
+ gulong x_root, y_root;
+ guint32 timestamp;
+ int button;
+
+ if (meta_prefs_get_raise_on_click ())
+ meta_window_raise (window);
+
+ timestamp = meta_display_get_current_time_roundtrip (display);
+ x_root = event->xclient.data.l[1];
+ y_root = event->xclient.data.l[2];
+ button = 3;
+
+ meta_window_show_menu (window,
+ x_root,
+ y_root,
+ button,
+ timestamp);
+ }
return FALSE;
}