@@ -39,7 +39,6 @@ namespace Gala {
3939
4040 private IconGroupContainer icon_groups;
4141 private Clutter . Actor workspaces;
42- private Clutter . Actor dock_clones;
4342 private Clutter . Actor primary_monitor_container;
4443 private Clutter . BrightnessContrastEffect brightness_effect;
4544
@@ -83,8 +82,6 @@ namespace Gala {
8382
8483 icon_groups = new IconGroupContainer (display. get_monitor_scale (display. get_primary_monitor ()));
8584
86- dock_clones = new Clutter .Actor ();
87-
8885 brightness_effect = new Clutter .BrightnessContrastEffect ();
8986 update_brightness_effect ();
9087
@@ -101,7 +98,6 @@ namespace Gala {
10198 primary_monitor_container. add_child (icon_groups);
10299 primary_monitor_container. add_child (workspaces);
103100 add_child (primary_monitor_container);
104- add_child (dock_clones);
105101
106102 unowned var manager = display. get_workspace_manager ();
107103 manager. workspace_added. connect (add_workspace);
@@ -675,9 +671,9 @@ namespace Gala {
675671 }
676672
677673 if (opening) {
678- show_docks (with_gesture, is_cancel_animation );
674+ ShellClientsManager . get_instance () . set_force_hide_panels ( true , multitasking_gesture_tracker, with_gesture );
679675 } else {
680- hide_docks (with_gesture, is_cancel_animation );
676+ ShellClientsManager . get_instance () . set_force_hide_panels ( false , multitasking_gesture_tracker, with_gesture );
681677 }
682678
683679 GestureTracker . OnEnd on_animation_end = (percentage, completions) = > {
@@ -694,8 +690,6 @@ namespace Gala {
694690 wm. window_group. show ();
695691 wm. top_window_group. show ();
696692
697- dock_clones. destroy_all_children ();
698-
699693 wm. pop_modal (modal_proxy);
700694 }
701695
@@ -716,107 +710,6 @@ namespace Gala {
716710 }
717711 }
718712
719- private void show_docks (bool with_gesture, bool is_cancel_animation) {
720- unowned GLib . List<Meta . WindowActor > window_actors = display. get_window_actors ();
721- foreach (unowned Meta . WindowActor actor in window_actors) {
722- const int MAX_OFFSET = 200 ;
723-
724- if (actor. is_destroyed () || ! actor. visible) {
725- continue ;
726- }
727-
728- unowned Meta . Window window = actor. get_meta_window ();
729- var monitor = window. get_monitor ();
730-
731- if (window. window_type != Meta . WindowType . DOCK ) {
732- continue ;
733- }
734-
735- if (NotificationStack . is_notification (window)) {
736- continue ;
737- }
738-
739- if (display. get_monitor_in_fullscreen (monitor)) {
740- continue ;
741- }
742-
743- var monitor_geom = display. get_monitor_geometry (monitor);
744-
745- var window_geom = window. get_frame_rect ();
746- var top = monitor_geom. y + MAX_OFFSET > window_geom. y;
747- var bottom = monitor_geom. y + monitor_geom. height - MAX_OFFSET < window_geom. y;
748-
749- if (! top && ! bottom) {
750- continue ;
751- }
752-
753- var initial_x = actor. x;
754- var initial_y = actor. y;
755- var target_y = (top)
756- ? actor. y - actor. height
757- : actor. y + actor. height;
758-
759- var clone = new SafeWindowClone (window, true );
760- dock_clones. add_child (clone);
761-
762- clone. set_position (initial_x, initial_y);
763-
764- GestureTracker . OnUpdate on_animation_update = (percentage) = > {
765- var y = GestureTracker . animation_value (initial_y, target_y, percentage);
766- clone. y = y;
767- };
768-
769- GestureTracker . OnEnd on_animation_end = (percentage, completions) = > {
770- if (completions == 0 ) {
771- return ;
772- }
773-
774- clone. save_easing_state ();
775- clone. set_easing_mode (Clutter . AnimationMode . EASE_OUT_QUAD );
776- clone. set_easing_duration ((! is_cancel_animation && AnimationsSettings . get_enable_animations ()) ? ANIMATION_DURATION : 0 );
777- clone. y = target_y;
778- clone. restore_easing_state ();
779- };
780-
781- if (! with_gesture || ! AnimationsSettings . get_enable_animations ()) {
782- on_animation_end (1 , 1 , 0 );
783- } else {
784- multitasking_gesture_tracker. connect_handlers (null , (owned ) on_animation_update, (owned ) on_animation_end);
785- }
786- }
787- }
788-
789- private void hide_docks (bool with_gesture, bool is_cancel_animation) {
790- foreach (unowned var child in dock_clones. get_children ()) {
791- var dock = (Clutter . Clone ) child;
792- var initial_y = dock. y;
793- var target_y = dock. source. y;
794-
795- GestureTracker . OnUpdate on_animation_update = (percentage) = > {
796- var y = GestureTracker . animation_value (initial_y, target_y, percentage);
797- dock. y = y;
798- };
799-
800- GestureTracker . OnEnd on_animation_end = (percentage, completions) = > {
801- if (completions == 0 ) {
802- return ;
803- }
804-
805- dock. save_easing_state ();
806- dock. set_easing_mode (Clutter . AnimationMode . EASE_OUT_QUAD );
807- dock. set_easing_duration (AnimationsSettings . get_animation_duration (ANIMATION_DURATION ));
808- dock. y = target_y;
809- dock. restore_easing_state ();
810- };
811-
812- if (! with_gesture || ! AnimationsSettings . get_enable_animations ()) {
813- on_animation_end (1 , 1 , 0 );
814- } else {
815- multitasking_gesture_tracker. connect_handlers (null , (owned ) on_animation_update, (owned ) on_animation_end);
816- }
817- }
818- }
819-
820713 private bool keybinding_filter (Meta . KeyBinding binding) {
821714 var action = Meta . Prefs . get_keybinding_action (binding. get_name ());
822715
0 commit comments