summaryrefslogtreecommitdiff
path: root/gtk/gtkapplication.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2011-11-28 23:40:18 -0500
committerRyan Lortie <desrt@desrt.ca>2011-12-19 12:51:07 -0500
commit6b7be4a3a244bcb7df746a5a46cf3418c79722af (patch)
treec781d52bd9b0ac8f9272a4f6a7cf1c870eb51f2f /gtk/gtkapplication.c
parent9c52a73c217021be036da382adc5d70e11201215 (diff)
downloadgtk+-6b7be4a3a244bcb7df746a5a46cf3418c79722af.tar.gz
Add a very bad fallback check
...maybe committing this inspires some better solution.
Diffstat (limited to 'gtk/gtkapplication.c')
-rw-r--r--gtk/gtkapplication.c22
1 files changed, 21 insertions, 1 deletions
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 ();