# Description: add a gconf key (/desktop/gnome/interface/hide_decorator_tooltip)
# to disable tooltip in decorator bar. If key not present, show the tooltip.
# Origin: Ubuntu
# Bug: 
# Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/519856

Index: mutter-2.28.1~git20091208/src/core/prefs.c
===================================================================
--- mutter-2.28.1~git20091208.orig/src/core/prefs.c	2009-10-24 16:53:49.000000000 +0200
+++ mutter-2.28.1~git20091208/src/core/prefs.c	2010-02-10 18:33:37.751188285 +0100
@@ -100,6 +100,7 @@
 static int   cursor_size = 24;
 static gboolean compositing_manager = FALSE;
 static gboolean resize_with_right_button = FALSE;
+static gboolean hide_decorator_tooltip = FALSE;
 
 static MetaVisualBellType visual_bell_type = META_VISUAL_BELL_FULLSCREEN_FLASH;
 static MetaButtonLayout button_layout;
@@ -426,6 +427,11 @@
       &no_tab_popup,
       FALSE,
     },
+    { "/desktop/gnome/interface/hide_decorator_tooltip",
+      META_PREF_HIDE_DECORATOR_TOOLTIP,
+      &hide_decorator_tooltip,
+      FALSE,
+    },
     { NULL, 0, NULL, FALSE },
   };
 
@@ -1313,6 +1319,12 @@
   return raise_on_click || focus_mode == META_FOCUS_MODE_CLICK;
 }
 
+gboolean
+meta_prefs_get_hide_decorator_tooltip (void)
+{
+  return hide_decorator_tooltip;
+}
+
 const char*
 meta_prefs_get_theme (void)
 {
@@ -1808,6 +1820,9 @@
 
     case META_PREF_NO_TAB_POPUP:
       return "NO_TAB_POPUP";
+
+    case META_PREF_HIDE_DECORATOR_TOOLTIP:
+      return "HIDE_DECORATOR_TOOLTIP";
     }
 
   return "(unknown)";
Index: mutter-2.28.1~git20091208/src/include/prefs.h
===================================================================
--- mutter-2.28.1~git20091208.orig/src/include/prefs.h	2009-10-24 16:53:49.000000000 +0200
+++ mutter-2.28.1~git20091208/src/include/prefs.h	2010-02-10 18:33:37.751188285 +0100
@@ -62,6 +62,7 @@
   META_PREF_CLUTTER_PLUGINS,
   META_PREF_LIVE_HIDDEN_WINDOWS,
   META_PREF_NO_TAB_POPUP,
+  META_PREF_HIDE_DECORATOR_TOOLTIP
 } MetaPreference;
 
 typedef void (* MetaPrefsChangedFunc) (MetaPreference pref,
@@ -81,6 +82,7 @@
 MetaFocusMode               meta_prefs_get_focus_mode         (void);
 MetaFocusNewWindows         meta_prefs_get_focus_new_windows  (void);
 gboolean                    meta_prefs_get_raise_on_click     (void);
+gboolean                    meta_prefs_get_hide_decorator_tooltip (void);
 const char*                 meta_prefs_get_theme              (void);
 /* returns NULL if GTK default should be used */
 const PangoFontDescription* meta_prefs_get_titlebar_font      (void);
Index: mutter-2.28.1~git20091208/src/ui/frames.c
===================================================================
--- mutter-2.28.1~git20091208.orig/src/ui/frames.c	2009-10-24 16:53:49.000000000 +0200
+++ mutter-2.28.1~git20091208/src/ui/frames.c	2010-02-10 18:33:53.239186202 +0100
@@ -1100,6 +1100,9 @@
   if (frame == NULL)
     return;
 
+  if (meta_prefs_get_hide_decorator_tooltip ())
+    return;
+
   XQueryPointer (gdk_display,
                  frame->xwindow,
                  &root, &child,
