mirror of
https://github.com/brl/mutter.git
synced 2024-11-28 19:10:43 -05:00
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.
This commit is contained in:
parent
f9f2a82e18
commit
c485637a61
@ -469,8 +469,6 @@ on_minimize_effect_complete (ClutterTimeline *timeline, EffectCompleteData *data
|
|||||||
/* FIXME - we shouldn't assume the original scale, it should be saved
|
/* FIXME - we shouldn't assume the original scale, it should be saved
|
||||||
* at the start of the effect */
|
* at the start of the effect */
|
||||||
clutter_actor_set_scale (data->actor, 1.0, 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 */
|
/* Now notify the manager that we are done with this effect */
|
||||||
meta_plugin_minimize_completed (plugin, window_actor);
|
meta_plugin_minimize_completed (plugin, window_actor);
|
||||||
@ -507,9 +505,6 @@ minimize (MetaPlugin *plugin, MetaWindowActor *window_actor)
|
|||||||
|
|
||||||
apriv->is_minimized = TRUE;
|
apriv->is_minimized = TRUE;
|
||||||
|
|
||||||
clutter_actor_move_anchor_point_from_gravity (actor,
|
|
||||||
CLUTTER_GRAVITY_CENTER);
|
|
||||||
|
|
||||||
animation = clutter_actor_animate (actor,
|
animation = clutter_actor_animate (actor,
|
||||||
CLUTTER_EASE_IN_SINE,
|
CLUTTER_EASE_IN_SINE,
|
||||||
MINIMIZE_TIMEOUT,
|
MINIMIZE_TIMEOUT,
|
||||||
@ -548,8 +543,6 @@ on_maximize_effect_complete (ClutterTimeline *timeline, EffectCompleteData *data
|
|||||||
|
|
||||||
/* FIXME - don't assume the original scale was 1.0 */
|
/* FIXME - don't assume the original scale was 1.0 */
|
||||||
clutter_actor_set_scale (data->actor, 1.0, 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 */
|
/* Now notify the manager that we are done with this effect */
|
||||||
meta_plugin_maximize_completed (plugin, window_actor);
|
meta_plugin_maximize_completed (plugin, window_actor);
|
||||||
@ -574,10 +567,8 @@ maximize (MetaPlugin *plugin,
|
|||||||
ClutterActor *actor = CLUTTER_ACTOR (window_actor);
|
ClutterActor *actor = CLUTTER_ACTOR (window_actor);
|
||||||
MetaWindow *meta_window = meta_window_actor_get_meta_window (window_actor);
|
MetaWindow *meta_window = meta_window_actor_get_meta_window (window_actor);
|
||||||
|
|
||||||
gdouble scale_x = 1.0;
|
gdouble scale_x = 1.0;
|
||||||
gdouble scale_y = 1.0;
|
gdouble scale_y = 1.0;
|
||||||
gfloat anchor_x = 0;
|
|
||||||
gfloat anchor_y = 0;
|
|
||||||
|
|
||||||
type = meta_window_get_window_type (meta_window);
|
type = meta_window_get_window_type (meta_window);
|
||||||
|
|
||||||
@ -601,13 +592,6 @@ maximize (MetaPlugin *plugin,
|
|||||||
scale_x = (gdouble)end_width / (gdouble) width;
|
scale_x = (gdouble)end_width / (gdouble) width;
|
||||||
scale_y = (gdouble)end_height / (gdouble) height;
|
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,
|
animation = clutter_actor_animate (actor,
|
||||||
CLUTTER_EASE_IN_SINE,
|
CLUTTER_EASE_IN_SINE,
|
||||||
MAXIMIZE_TIMEOUT,
|
MAXIMIZE_TIMEOUT,
|
||||||
@ -662,9 +646,6 @@ on_map_effect_complete (ClutterTimeline *timeline, EffectCompleteData *data)
|
|||||||
|
|
||||||
apriv->tml_map = NULL;
|
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 */
|
/* Now notify the manager that we are done with this effect */
|
||||||
meta_plugin_map_completed (plugin, window_actor);
|
meta_plugin_map_completed (plugin, window_actor);
|
||||||
|
|
||||||
@ -750,9 +731,6 @@ destroy (MetaPlugin *plugin, MetaWindowActor *window_actor)
|
|||||||
EffectCompleteData *data = g_new0 (EffectCompleteData, 1);
|
EffectCompleteData *data = g_new0 (EffectCompleteData, 1);
|
||||||
ActorPrivate *apriv = get_actor_private (window_actor);
|
ActorPrivate *apriv = get_actor_private (window_actor);
|
||||||
|
|
||||||
clutter_actor_move_anchor_point_from_gravity (actor,
|
|
||||||
CLUTTER_GRAVITY_CENTER);
|
|
||||||
|
|
||||||
animation = clutter_actor_animate (actor,
|
animation = clutter_actor_animate (actor,
|
||||||
CLUTTER_EASE_IN_SINE,
|
CLUTTER_EASE_IN_SINE,
|
||||||
DESTROY_TIMEOUT,
|
DESTROY_TIMEOUT,
|
||||||
|
Loading…
Reference in New Issue
Block a user