diff options
author | Björn Weber <[email protected]> | 2017-12-29 18:52:45 +0100 |
---|---|---|
committer | raveit65 <[email protected]> | 2018-01-02 10:37:02 +0100 |
commit | 2cebadddb41ba4e5c2063ca9ce31fc5ed14300c1 (patch) | |
tree | 051efa62742f7247afa7b40618baaf0d25fa9e96 /src/core | |
parent | 52701a81d82cd89525ed883cb046f11f384c8d6c (diff) | |
download | marco-2cebadddb41ba4e5c2063ca9ce31fc5ed14300c1.tar.bz2 marco-2cebadddb41ba4e5c2063ca9ce31fc5ed14300c1.tar.xz |
Add support for gtk3 _GTK_SHOW_WINDOW_MENU event
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/atomnames.h | 1 | ||||
-rw-r--r-- | src/core/screen.c | 1 | ||||
-rw-r--r-- | src/core/window.c | 21 |
3 files changed, 23 insertions, 0 deletions
diff --git a/src/core/atomnames.h b/src/core/atomnames.h index 2775d3db..cda2e33a 100644 --- a/src/core/atomnames.h +++ b/src/core/atomnames.h @@ -59,6 +59,7 @@ item(_MARCO_RELOAD_THEME_MESSAGE) item(_MARCO_SET_KEYBINDINGS_MESSAGE) item(_MARCO_TOGGLE_VERBOSE) item(_GTK_FRAME_EXTENTS) +item(_GTK_SHOW_WINDOW_MENU) item(_MATE_PANEL_ACTION) item(_MATE_PANEL_ACTION_MAIN_MENU) item(_MATE_PANEL_ACTION_RUN_DIALOG) diff --git a/src/core/screen.c b/src/core/screen.c index f0ce5dff..107a2d0b 100644 --- a/src/core/screen.c +++ b/src/core/screen.c @@ -103,6 +103,7 @@ set_supported_hint (MetaScreen *screen) #undef item #undef EWMH_ATOMS_ONLY screen->display->atom__GTK_FRAME_EXTENTS, + screen->display->atom__GTK_SHOW_WINDOW_MENU, }; XChangeProperty (screen->display->xdisplay, screen->xroot, 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; } |