@@ -1439,7 +1439,7 @@ namespace Gala {
14391439 // Notifications are a special case and have to be always be handled
14401440 // (also regardless of the animation setting)
14411441 if (NotificationStack . is_notification (window)) {
1442- clutter_actor_reparent (actor, notification_group);
1442+ InternalUtils . clutter_actor_reparent (actor, notification_group);
14431443 notification_stack. show_notification (actor);
14441444
14451445 map_completed (actor);
@@ -1945,7 +1945,7 @@ namespace Gala {
19451945 windows. append (actor);
19461946 parents. append (actor. get_parent ());
19471947
1948- clutter_actor_reparent (actor, static_windows);
1948+ InternalUtils . clutter_actor_reparent (actor, static_windows);
19491949 actor. set_translation (- clone_offset_x, - clone_offset_y, 0 );
19501950
19511951 // Don't fade docks and moving/grabbed windows they just stay where they are
@@ -1966,7 +1966,7 @@ namespace Gala {
19661966 windows. append (actor);
19671967 parents. append (actor. get_parent ());
19681968 actor. set_translation (- clone_offset_x, - clone_offset_y, 0 );
1969- clutter_actor_reparent (actor, out_group);
1969+ InternalUtils . clutter_actor_reparent (actor, out_group);
19701970
19711971 if (window. fullscreen)
19721972 from_has_fullscreened = true ;
@@ -1975,7 +1975,7 @@ namespace Gala {
19751975 windows. append (actor);
19761976 parents. append (actor. get_parent ());
19771977 actor. set_translation (- clone_offset_x, - clone_offset_y, 0 );
1978- clutter_actor_reparent (actor, in_group);
1978+ InternalUtils . clutter_actor_reparent (actor, in_group);
19791979
19801980 if (window. fullscreen)
19811981 to_has_fullscreened = true ;
@@ -2050,7 +2050,7 @@ namespace Gala {
20502050 switch_workspace_window_created_id = window_created. connect ((window) = > {
20512051 if (NotificationStack . is_notification (window)) {
20522052 InternalUtils . wait_for_window_actor_visible (window, (actor) = > {
2053- clutter_actor_reparent (actor, notification_group);
2053+ InternalUtils . clutter_actor_reparent (actor, notification_group);
20542054 notification_stack. show_notification (actor);
20552055 });
20562056 }
@@ -2145,7 +2145,14 @@ namespace Gala {
21452145 unowned Meta . Display display = get_display ();
21462146 unowned var active_workspace = display. get_workspace_manager (). get_active_workspace ();
21472147 unowned var neighbor = active_workspace. get_neighbor (cancel_direction);
2148- neighbor. activate (display. get_current_time ());
2148+
2149+ if (moving != null ) {
2150+ move_window (moving, neighbor, Meta . CURRENT_TIME );
2151+ } else {
2152+ neighbor. activate (display. get_current_time ());
2153+ }
2154+ } else {
2155+ moving = null ;
21492156 }
21502157 }
21512158
@@ -2173,13 +2180,13 @@ namespace Gala {
21732180
21742181 unowned Meta . WindowActor ? window = actor as Meta . WindowActor ;
21752182 if (window == null ) {
2176- clutter_actor_reparent (actor, parents. nth_data (i));
2183+ InternalUtils . clutter_actor_reparent (actor, parents. nth_data (i));
21772184 continue ;
21782185 }
21792186
21802187 unowned Meta . Window ? meta_window = window. get_meta_window ();
21812188 if (! window. is_destroyed ()) {
2182- clutter_actor_reparent (actor, parents. nth_data (i));
2189+ InternalUtils . clutter_actor_reparent (actor, parents. nth_data (i));
21832190 }
21842191
21852192 kill_window_effects (window);
@@ -2207,7 +2214,6 @@ namespace Gala {
22072214
22082215 windows = null ;
22092216 parents = null ;
2210- moving = null ;
22112217
22122218 out_group = null ;
22132219 in_group = null ;
@@ -2344,18 +2350,5 @@ namespace Gala {
23442350 // Ignore this error
23452351 }
23462352 }
2347-
2348- private static void clutter_actor_reparent (Clutter . Actor actor, Clutter . Actor new_parent) {
2349- if (actor == new_parent)
2350- return ;
2351-
2352- actor. ref ();
2353- actor. get_parent (). remove_child (actor);
2354- new_parent. add_child (actor);
2355- actor. unref ();
2356- }
23572353 }
2358-
2359- [CCode (cname= " clutter_x11_get_stage_window" )]
2360- public extern X . Window x_get_stage_window (Clutter . Actor stage);
23612354}
0 commit comments