From 6b7be4a3a244bcb7df746a5a46cf3418c79722af Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 28 Nov 2011 23:40:18 -0500 Subject: Add a very bad fallback check ...maybe committing this inspires some better solution. --- gtk/gtkapplication.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'gtk/gtkapplication.c') diff --git a/gtk/gtkapplication.c b/gtk/gtkapplication.c index 15469958fc..7c540323f5 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 (); -- cgit v1.2.1