[gtk+/wip/gmenu: 27/87] Add a very bad fallback check
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/gmenu: 27/87] Add a very bad fallback check
- Date: Sat, 3 Dec 2011 23:50:25 +0000 (UTC)
commit b793eec92db260034f75d00eeee26e78a045cdcf
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Nov 28 23:40:18 2011 -0500
Add a very bad fallback check
...maybe committing this inspires some better solution.
gtk/gtkapplication.c | 22 +++++++++++++++++++++-
1 files changed, 21 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkapplication.c b/gtk/gtkapplication.c
index cd57552..d07496b 100644
--- a/gtk/gtkapplication.c
+++ b/gtk/gtkapplication.c
@@ -741,7 +741,27 @@ gtk_application_get_menu (GtkApplication *application)
if (!model)
return NULL;
- /* FIXME: find out if external menu is available. If yes, return NULL */
+ /* FIXME: find out if external menu is available. If yes, return NULL.
+ * For now, we just check if the wm is mutter (ie gnome-shell)
+ */
+#ifdef GDK_WINDOWING_X11
+ if (application->priv->windows)
+ {
+ GtkWidget *window;
+ GdkScreen *screen;
+
+ window = application->priv->windows->data;
+ screen = gtk_widget_get_screen (window);
+ if (GDK_IS_X11_SCREEN (screen))
+ {
+ const gchar *wm;
+
+ wm = gdk_x11_screen_get_window_manager_name (GDK_X11_SCREEN (screen));
+ if (g_strcmp0 (wm, "Mutter") == 0)
+ return NULL;
+ }
+ }
+#endif
menu = gtk_menu_new ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]