[mutter] screen: Add a method to hide the tile preview unconditionally



commit 53d6938b55851180fda9b3db6748ea320f1d04c2
Author: Florian Müllner <fmuellner gnome org>
Date:   Wed Jan 19 22:38:51 2011 +0100

    screen: Add a method to hide the tile preview unconditionally
    
    Add meta_screen_tile_preview_hide() to hide the tile preview
    independent from the tile state of the dragged window.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=639988

 src/core/screen-private.h |    1 +
 src/core/screen.c         |   10 ++++++++++
 2 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/core/screen-private.h b/src/core/screen-private.h
index 49867f2..7db3544 100644
--- a/src/core/screen-private.h
+++ b/src/core/screen-private.h
@@ -184,6 +184,7 @@ void          meta_screen_workspace_popup_destroy      (MetaScreen    *screen);
 
 void          meta_screen_tile_preview_update          (MetaScreen    *screen,
                                                         gboolean       delay);
+void          meta_screen_tile_preview_hide            (MetaScreen    *screen);
 
 MetaWindow*   meta_screen_get_mouse_window     (MetaScreen                 *screen,
                                                 MetaWindow                 *not_this_one);
diff --git a/src/core/screen.c b/src/core/screen.c
index 1bb0e1c..9d9ea0d 100644
--- a/src/core/screen.c
+++ b/src/core/screen.c
@@ -1843,6 +1843,16 @@ meta_screen_tile_preview_update (MetaScreen *screen,
     }
 }
 
+void
+meta_screen_tile_preview_hide (MetaScreen *screen)
+{
+  if (screen->tile_preview_timeout_id > 0)
+    g_source_remove (screen->tile_preview_timeout_id);
+
+  if (screen->tile_preview)
+    meta_tile_preview_hide (screen->tile_preview);
+}
+
 MetaWindow*
 meta_screen_get_mouse_window (MetaScreen  *screen,
                               MetaWindow  *not_this_one)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]