diff --git a/src/Main.vala b/src/Main.vala index a311223c..a98dac64 100644 --- a/src/Main.vala +++ b/src/Main.vala @@ -538,8 +538,7 @@ namespace Gala //add actor to list and check if he's already in there.. void add_animator (ref Gee.LinkedList list, WindowActor actor) { - if (list.index_of (actor) < 0) - list.add (actor); + list.add (actor); } //kill everything on actor if it's doing something, true if we did @@ -577,8 +576,10 @@ namespace Gala public override void kill_window_effects (WindowActor actor) { - if (end_animation (ref mapping, actor)) + if (end_animation (ref mapping, actor)) { map_completed (actor); + print ("KILLED MAPPING ONE\n"); + } if (end_animation (ref minimizing, actor)) minimize_completed (actor); if (end_animation (ref maximizing, actor)) @@ -590,6 +591,20 @@ namespace Gala } + public void kill_all_running_effects () + { + foreach (var it in mapping) + kill_window_effects (it as WindowActor); + foreach (var it in minimizing) + kill_window_effects (it as WindowActor); + foreach (var it in maximizing) + kill_window_effects (it as WindowActor); + foreach (var it in unmaximizing) + kill_window_effects (it as WindowActor); + foreach (var it in destroying) + kill_window_effects (it as WindowActor); + } + /*workspace switcher*/ GLib.List? win; GLib.List? par; //class space for kill func diff --git a/src/Widgets/WindowSwitcher.vala b/src/Widgets/WindowSwitcher.vala index 77eb6060..08a9d936 100644 --- a/src/Widgets/WindowSwitcher.vala +++ b/src/Widgets/WindowSwitcher.vala @@ -268,10 +268,8 @@ namespace Gala return; } - window_list.foreach ((w) => { - plugin.kill_window_effects (w.get_compositor_private () as Meta.WindowActor); - }); - + plugin.kill_all_running_effects (); + plugin.begin_modal (); var area = screen.get_monitor_geometry (screen.get_primary_monitor ());