From 6dfb56cc7757a4bedfc092a2ad89de3b71096964 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Sandmann?= Date: Thu, 25 May 2006 02:15:49 +0000 Subject: [PATCH] Make sure windows are kept on top of the panel during minimize. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Wed May 24 22:15:01 2006 Søren Sandmann * src/compositor.c (do_effect): Make sure windows are kept on top of the panel during minimize. --- ChangeLog | 5 +++++ src/c-window.c | 6 +++--- src/c-window.h | 4 ++-- src/compositor.c | 13 ++++++++++++- 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0bfbdc6dd..1684fa8f7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed May 24 22:15:01 2006 Søren Sandmann + + * src/compositor.c (do_effect): Make sure windows are kept on top + of the panel during minimize. + Wed May 24 21:17:59 2006 Søren Sandmann * src/compositor.c (do_effect): Shrink the window instead of diff --git a/src/c-window.c b/src/c-window.c index 135603ce1..c1988c26e 100644 --- a/src/c-window.c +++ b/src/c-window.c @@ -1062,7 +1062,7 @@ run_animation_01 (gpointer data) } void -meta_comp_window_run_minimize (MetaWindow *window, +meta_comp_window_run_minimize (MetaCompWindow *window, MetaEffect *effect) { MiniInfo *info = g_new (MiniInfo, 1); @@ -1083,13 +1083,13 @@ meta_comp_window_run_minimize (MetaWindow *window, info->button_y = effect->u.minimize.icon_rect.y; info->button_width = effect->u.minimize.icon_rect.width; info->button_height = effect->u.minimize.icon_rect.height; - + #if 0 cm_drawable_node_set_deformation_func (node, minimize_deformation, info); #endif info->aspect_ratio = 1.3; - + g_idle_add (run_animation_01, info); } diff --git a/src/c-window.h b/src/c-window.h index 700f20ca7..099b208b8 100644 --- a/src/c-window.h +++ b/src/c-window.h @@ -50,8 +50,8 @@ void meta_comp_window_restack (MetaCompWindow *comp_window, void meta_comp_window_freeze_stack (MetaCompWindow *comp_window); void meta_comp_window_thaw_stack (MetaCompWindow *comp_window); gboolean meta_comp_window_stack_frozen (MetaCompWindow *comp_window); -void meta_comp_window_run_minimize (MetaWindow *window, - MetaEffect *effect); +void meta_comp_window_run_minimize (MetaCompWindow *window, + MetaEffect *effect); #if 0 void meta_comp_window_set_explode (MetaCompWindow *comp_window, diff --git a/src/compositor.c b/src/compositor.c index 6f0274c0d..46fa983ff 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -118,9 +118,20 @@ do_effect (MetaEffect *effect, { MetaCompScreen *screen = meta_comp_screen_get_by_xwindow ( get_xid (effect->u.minimize.window)); - MetaCompWindow *window = + MetaCompWindow *window; + + if (!effect->u.minimize.window->frame) + { + meta_effect_end (effect); + return; + } + + window = meta_comp_screen_lookup_window (screen, effect->u.minimize.window->frame->xwindow); + /* FIXME: a hack to make sure the window starts on top of the panel */ + meta_comp_screen_raise_window (screen, effect->u.minimize.window->frame->xwindow); + meta_comp_window_run_minimize (window, effect); #if 0 meta_comp_window_explode (window, effect);