[gtk+] Add a very bad fallback check
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Add a very bad fallback check
- Date: Mon, 19 Dec 2011 17:56:13 +0000 (UTC)
commit 6b7be4a3a244bcb7df746a5a46cf3418c79722af
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 1546995..7c54032 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]