diff options
author | Jasper St. Pierre <jstpierre@mecheye.net> | 2014-02-17 17:53:54 -0500 |
---|---|---|
committer | Jasper St. Pierre <jstpierre@mecheye.net> | 2014-02-17 17:57:45 -0500 |
commit | c485637a6132a86d6a6f802cfa55a8eb55d34705 (patch) | |
tree | cc0f82fa3e27bac0a38f99c81098537c7a449be1 | |
parent | f9f2a82e1807ab7f9f1e669c6fc7ec4dd1642298 (diff) | |
download | mutter-c485637a6132a86d6a6f802cfa55a8eb55d34705.tar.gz |
default: Don't use anchor points
It doesn't work now that we set the pivot point. This breaks the
maximize effect, but it fixes the destroy effect. The maximize effect
looks bad anyway, so it's not too important to me.
-rw-r--r-- | src/compositor/plugins/default.c | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/src/compositor/plugins/default.c b/src/compositor/plugins/default.c index edfb24bbb..de63007ec 100644 --- a/src/compositor/plugins/default.c +++ b/src/compositor/plugins/default.c @@ -469,8 +469,6 @@ on_minimize_effect_complete (ClutterTimeline *timeline, EffectCompleteData *data /* FIXME - we shouldn't assume the original scale, it should be saved * at the start of the effect */ clutter_actor_set_scale (data->actor, 1.0, 1.0); - clutter_actor_move_anchor_point_from_gravity (data->actor, - CLUTTER_GRAVITY_NORTH_WEST); /* Now notify the manager that we are done with this effect */ meta_plugin_minimize_completed (plugin, window_actor); @@ -507,9 +505,6 @@ minimize (MetaPlugin *plugin, MetaWindowActor *window_actor) apriv->is_minimized = TRUE; - clutter_actor_move_anchor_point_from_gravity (actor, - CLUTTER_GRAVITY_CENTER); - animation = clutter_actor_animate (actor, CLUTTER_EASE_IN_SINE, MINIMIZE_TIMEOUT, @@ -548,8 +543,6 @@ on_maximize_effect_complete (ClutterTimeline *timeline, EffectCompleteData *data /* FIXME - don't assume the original scale was 1.0 */ clutter_actor_set_scale (data->actor, 1.0, 1.0); - clutter_actor_move_anchor_point_from_gravity (data->actor, - CLUTTER_GRAVITY_NORTH_WEST); /* Now notify the manager that we are done with this effect */ meta_plugin_maximize_completed (plugin, window_actor); @@ -574,10 +567,8 @@ maximize (MetaPlugin *plugin, ClutterActor *actor = CLUTTER_ACTOR (window_actor); MetaWindow *meta_window = meta_window_actor_get_meta_window (window_actor); - gdouble scale_x = 1.0; - gdouble scale_y = 1.0; - gfloat anchor_x = 0; - gfloat anchor_y = 0; + gdouble scale_x = 1.0; + gdouble scale_y = 1.0; type = meta_window_get_window_type (meta_window); @@ -601,13 +592,6 @@ maximize (MetaPlugin *plugin, scale_x = (gdouble)end_width / (gdouble) width; scale_y = (gdouble)end_height / (gdouble) height; - anchor_x = (gdouble)(x - end_x)*(gdouble)width / - ((gdouble)(end_width - width)); - anchor_y = (gdouble)(y - end_y)*(gdouble)height / - ((gdouble)(end_height - height)); - - clutter_actor_move_anchor_point (actor, anchor_x, anchor_y); - animation = clutter_actor_animate (actor, CLUTTER_EASE_IN_SINE, MAXIMIZE_TIMEOUT, @@ -662,9 +646,6 @@ on_map_effect_complete (ClutterTimeline *timeline, EffectCompleteData *data) apriv->tml_map = NULL; - clutter_actor_move_anchor_point_from_gravity (data->actor, - CLUTTER_GRAVITY_NORTH_WEST); - /* Now notify the manager that we are done with this effect */ meta_plugin_map_completed (plugin, window_actor); @@ -750,9 +731,6 @@ destroy (MetaPlugin *plugin, MetaWindowActor *window_actor) EffectCompleteData *data = g_new0 (EffectCompleteData, 1); ActorPrivate *apriv = get_actor_private (window_actor); - clutter_actor_move_anchor_point_from_gravity (actor, - CLUTTER_GRAVITY_CENTER); - animation = clutter_actor_animate (actor, CLUTTER_EASE_IN_SINE, DESTROY_TIMEOUT, |