From 53d6938b55851180fda9b3db6748ea320f1d04c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Wed, 19 Jan 2011 22:38:51 +0100 Subject: [PATCH] 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(+) diff --git a/src/core/screen-private.h b/src/core/screen-private.h index 49867f275..7db354420 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 1bb0e1c59..9d9ea0d85 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)