From 83f82e5f28a02777523b7f0a1f16a78447845a71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Sandmann?= Date: Fri, 26 May 2006 18:59:15 +0000 Subject: [PATCH] Rename from _bounce() to _focus(). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fri May 26 14:55:07 2006 Søren Sandmann * src/c-window.c (meta_comp_window_run_focus): Rename from _bounce() to _focus(). --- ChangeLog | 5 +++++ src/c-window.c | 40 +++++++++++++++++----------------------- src/c-window.h | 8 +++++--- src/compositor.c | 7 +++---- 4 files changed, 30 insertions(+), 30 deletions(-) diff --git a/ChangeLog b/ChangeLog index 572944b17..719971b39 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri May 26 14:55:07 2006 Søren Sandmann + + * src/c-window.c (meta_comp_window_run_focus): Rename from + _bounce() to _focus(). + 2006-05-26 Elijah Newren * src/display.c (meta_display_close): Fix a crash on exit/logout diff --git a/src/c-window.c b/src/c-window.c index 9ac65c880..1bdfc3dfc 100644 --- a/src/c-window.c +++ b/src/c-window.c @@ -150,7 +150,8 @@ has_counter (MetaCompWindow *comp_window) g_print ("increasing counter\n"); ws_sync_counter_change (counter, 1); - g_print ("counter value %lld\n", ws_sync_counter_query_value (counter)); + g_print ("counter value %lld\n", + ws_sync_counter_query_value (counter)); } else { @@ -766,18 +767,7 @@ meta_comp_window_explode (MetaCompWindow *comp_window, ExplodeInfo *info = g_new0 (ExplodeInfo, 1); if (!cm_drawable_node_get_viewable (comp_window->node)) - { -#if 0 - g_print ("%p wasn't even viewable to begin with\n", comp_window->node); -#endif return; - } - else - { -#if 0 - g_print ("%p is viewable\n", comp_window->node); -#endif - } comp_window->animation_in_progress = TRUE; @@ -999,16 +989,16 @@ typedef struct Model *model; MetaRectangle rect; gdouble last_time; -} BounceInfo; +} FocusInfo; /* XXX HATE */ extern void get_patch_points (Model *model, CmPoint points[4][4]); extern void compute_window_rect (MetaWindow *window, MetaRectangle *rect); static gboolean -update_bounce (gpointer data) +update_focus (gpointer data) { - BounceInfo *info = data; + FocusInfo *info = data; CmDrawableNode *node = (CmDrawableNode *)info->window->node; gdouble elapsed = g_timer_elapsed (info->timer, NULL); int i; @@ -1036,10 +1026,10 @@ update_bounce (gpointer data) } void -meta_comp_window_bounce (MetaCompWindow *comp_window, - MetaEffect *effect) +meta_comp_window_run_focus (MetaCompWindow *comp_window, + MetaEffect *effect) { - BounceInfo *info = g_new0 (BounceInfo, 1); + FocusInfo *info = g_new0 (FocusInfo, 1); MetaWindow *meta_window = meta_display_lookup_x_window (comp_window->display, WS_RESOURCE_XID (comp_window->drawable)); @@ -1052,13 +1042,15 @@ meta_comp_window_bounce (MetaCompWindow *comp_window, compute_window_rect (meta_window, &info->rect); info->model = model_new (&info->rect, TRUE); - g_idle_add (update_bounce, info); + g_idle_add (update_focus, info); } -#endif - -#if 0 -#endif +void +meta_comp_window_run_restore (MetaCompWindow *comp_window, + MetaEffect *effect) +{ + meta_effect_end (effect); +} void meta_comp_window_freeze_stack (MetaCompWindow *comp_window) @@ -1078,3 +1070,5 @@ meta_comp_window_stack_frozen (MetaCompWindow *comp_window) return comp_window->stack_freeze_count > 0; } +#endif + diff --git a/src/c-window.h b/src/c-window.h index 1302f27ba..b25cdfcfc 100644 --- a/src/c-window.h +++ b/src/c-window.h @@ -50,8 +50,8 @@ void meta_comp_window_shrink (MetaCompWindow *comp_window, MetaEffect *effect); void meta_comp_window_unshrink (MetaCompWindow *comp_window, MetaEffect *effect); -void meta_comp_window_bounce (MetaCompWindow *comp_window, - MetaEffect *effect); +void meta_comp_window_focus (MetaCompWindow *comp_window, + MetaEffect *effect); void meta_comp_window_restack (MetaCompWindow *comp_window, MetaCompWindow *above); void meta_comp_window_freeze_stack (MetaCompWindow *comp_window); @@ -59,7 +59,9 @@ void meta_comp_window_thaw_stack (MetaCompWindow *comp_window); gboolean meta_comp_window_stack_frozen (MetaCompWindow *comp_window); void meta_comp_window_run_minimize (MetaCompWindow *window, MetaEffect *effect); - +void meta_comp_window_run_restore (MetaCompWindow *comp_window, + MetaEffect *effect); + #if 0 void meta_comp_window_set_explode (MetaCompWindow *comp_window, double level); diff --git a/src/compositor.c b/src/compositor.c index 33296edf7..e914c67b7 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -130,13 +130,12 @@ do_effect (MetaEffect *effect, meta_comp_window_run_minimize (window, effect); break; -#if 0 case META_EFFECT_RESTORE: - meta_comp_window_unshrink (window, effect); + meta_comp_window_run_restore (window, effect); break; -#endif + case META_EFFECT_FOCUS: - meta_comp_window_bounce (window, effect); + meta_comp_window_run_focus (window, effect); break; case META_EFFECT_CLOSE: