[mutter] default: Remove the maximize effect
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] default: Remove the maximize effect
- Date: Mon, 28 Apr 2014 19:21:15 +0000 (UTC)
commit aed6d4fbb7517c64985d5fd16521edc513456c91
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Mon Apr 28 15:17:57 2014 -0400
default: Remove the maximize effect
It looks awful, and doesn't work with Wayland at all for some
reason, which means that maximize seems to "hang" for half a
second. Just trash it.
src/compositor/plugins/default.c | 98 --------------------------------------
1 files changed, 0 insertions(+), 98 deletions(-)
---
diff --git a/src/compositor/plugins/default.c b/src/compositor/plugins/default.c
index 151175a..7c2fccf 100644
--- a/src/compositor/plugins/default.c
+++ b/src/compositor/plugins/default.c
@@ -34,7 +34,6 @@
#define DESTROY_TIMEOUT 100
#define MINIMIZE_TIMEOUT 250
-#define MAXIMIZE_TIMEOUT 250
#define MAP_TIMEOUT 250
#define SWITCH_TIMEOUT 500
@@ -77,12 +76,6 @@ static void map (MetaPlugin *plugin,
MetaWindowActor *actor);
static void destroy (MetaPlugin *plugin,
MetaWindowActor *actor);
-static void maximize (MetaPlugin *plugin,
- MetaWindowActor *actor,
- gint x,
- gint y,
- gint width,
- gint height);
static void switch_workspace (MetaPlugin *plugin,
gint from,
@@ -129,7 +122,6 @@ typedef struct _ActorPrivate
ClutterActor *orig_parent;
ClutterTimeline *tml_minimize;
- ClutterTimeline *tml_maximize;
ClutterTimeline *tml_destroy;
ClutterTimeline *tml_map;
} ActorPrivate;
@@ -207,7 +199,6 @@ meta_default_plugin_class_init (MetaDefaultPluginClass *klass)
plugin_class->start = start;
plugin_class->map = map;
plugin_class->minimize = minimize;
- plugin_class->maximize = maximize;
plugin_class->destroy = destroy;
plugin_class->switch_workspace = switch_workspace;
plugin_class->show_tile_preview = show_tile_preview;
@@ -532,89 +523,6 @@ minimize (MetaPlugin *plugin, MetaWindowActor *window_actor)
meta_plugin_minimize_completed (plugin, window_actor);
}
-/*
- * Minimize effect completion callback; this function restores actor state, and
- * calls the manager callback function.
- */
-static void
-on_maximize_effect_complete (ClutterTimeline *timeline, EffectCompleteData *data)
-{
- /*
- * Must reverse the effect of the effect.
- */
- MetaPlugin *plugin = data->plugin;
- MetaWindowActor *window_actor = META_WINDOW_ACTOR (data->actor);
- ActorPrivate *apriv = get_actor_private (window_actor);
-
- apriv->tml_maximize = NULL;
-
- /* FIXME - don't assume the original scale was 1.0 */
- clutter_actor_set_scale (data->actor, 1.0, 1.0);
-
- /* Now notify the manager that we are done with this effect */
- meta_plugin_maximize_completed (plugin, window_actor);
-
- g_free (data);
-}
-
-/*
- * The Nature of Maximize operation is such that it is difficult to do a visual
- * effect that would work well. Scaling, the obvious effect, does not work that
- * well, because at the end of the effect we end up with window content bigger
- * and differently laid out than in the real window; this is a proof concept.
- *
- * (Something like a sound would be more appropriate.)
- */
-static void
-maximize (MetaPlugin *plugin,
- MetaWindowActor *window_actor,
- gint end_x, gint end_y, gint end_width, gint end_height)
-{
- MetaWindowType type;
- 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;
-
- type = meta_window_get_window_type (meta_window);
-
- if (type == META_WINDOW_NORMAL)
- {
- ClutterAnimation *animation;
- EffectCompleteData *data = g_new0 (EffectCompleteData, 1);
- ActorPrivate *apriv = get_actor_private (window_actor);
- gfloat width, height;
- gfloat x, y;
-
- clutter_actor_get_size (actor, &width, &height);
- clutter_actor_get_position (actor, &x, &y);
-
- /*
- * Work out the scale and anchor point so that the window is expanding
- * smoothly into the target size.
- */
- scale_x = (gdouble)end_width / (gdouble) width;
- scale_y = (gdouble)end_height / (gdouble) height;
-
- animation = clutter_actor_animate (actor,
- CLUTTER_EASE_IN_SINE,
- MAXIMIZE_TIMEOUT,
- "scale-x", scale_x,
- "scale-y", scale_y,
- NULL);
- apriv->tml_maximize = clutter_animation_get_timeline (animation);
- data->plugin = plugin;
- data->actor = actor;
- g_signal_connect (apriv->tml_maximize, "completed",
- G_CALLBACK (on_maximize_effect_complete),
- data);
- return;
- }
-
- meta_plugin_maximize_completed (plugin, window_actor);
-}
-
static void
on_map_effect_complete (ClutterTimeline *timeline, EffectCompleteData *data)
{
@@ -830,12 +738,6 @@ kill_window_effects (MetaPlugin *plugin,
g_signal_emit_by_name (apriv->tml_minimize, "completed", NULL);
}
- if (apriv->tml_maximize)
- {
- clutter_timeline_stop (apriv->tml_maximize);
- g_signal_emit_by_name (apriv->tml_maximize, "completed", NULL);
- }
-
if (apriv->tml_map)
{
clutter_timeline_stop (apriv->tml_map);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]