[mutter] x11: Add support for a new _GTK_SHOW_WINDOW_MENU request



commit 50b81fe4b9623dd34a1d9a93f12c7401bf0a0b0f
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Thu Mar 13 17:13:22 2014 -0400

    x11: Add support for a new _GTK_SHOW_WINDOW_MENU request
    
    To show the window menu from a client-side decoration.

 src/core/screen.c    |    1 +
 src/meta/atomnames.h |    1 +
 src/x11/window-x11.c |    5 +++++
 3 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/core/screen.c b/src/core/screen.c
index 96a1343..afc3ca9 100644
--- a/src/core/screen.c
+++ b/src/core/screen.c
@@ -297,6 +297,7 @@ set_supported_hint (MetaScreen *screen)
 #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/meta/atomnames.h b/src/meta/atomnames.h
index 29b8be9..e37e8fa 100644
--- a/src/meta/atomnames.h
+++ b/src/meta/atomnames.h
@@ -62,6 +62,7 @@ item(_GTK_WINDOW_OBJECT_PATH)
 item(_GTK_APP_MENU_OBJECT_PATH)
 item(_GTK_MENUBAR_OBJECT_PATH)
 item(_GTK_FRAME_EXTENTS)
+item(_GTK_SHOW_WINDOW_MENU)
 item(_GNOME_WM_KEYBINDINGS)
 item(_GNOME_PANEL_ACTION)
 item(_GNOME_PANEL_ACTION_MAIN_MENU)
diff --git a/src/x11/window-x11.c b/src/x11/window-x11.c
index dd01759..54654fd 100644
--- a/src/x11/window-x11.c
+++ b/src/x11/window-x11.c
@@ -2726,6 +2726,11 @@ meta_window_x11_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)
+    {
+      meta_window_show_menu (window);
+    }
 
   return FALSE;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]