[mutter/wip/compositor-menu: 12/13] x11: Add support for a new _GTK_SHOW_WINDOW_MENU request



commit 8ce4407a9f157e3475b58fd863c5dcc2f57342db
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/core/window-x11.c |    5 +++++
 src/meta/atomnames.h  |    1 +
 3 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/core/screen.c b/src/core/screen.c
index f1700c5..7da1a89 100644
--- a/src/core/screen.c
+++ b/src/core/screen.c
@@ -310,6 +310,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/core/window-x11.c b/src/core/window-x11.c
index a27a16a..e6e2a3e 100644
--- a/src/core/window-x11.c
+++ b/src/core/window-x11.c
@@ -1165,6 +1165,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;
 }
diff --git a/src/meta/atomnames.h b/src/meta/atomnames.h
index d5e8a47..e1551e8 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)


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