@@ -106,8 +106,6 @@ namespace Gala {
106106 private bool animating_switch_workspace = false ;
107107 private bool switch_workspace_with_gesture = false ;
108108
109- private signal void window_created (Meta .Window window );
110-
111109 /**
112110 * Amount of pixels to move on the nudge animation.
113111 */
@@ -362,9 +360,6 @@ namespace Gala {
362360
363361 update_input_area ();
364362
365-
366- display. window_created. connect ((window) = > window_created (window));
367-
368363 stage. show ();
369364
370365 Idle . add (() = > {
@@ -2154,11 +2149,16 @@ namespace Gala {
21542149
21552150 // while a workspace is being switched mutter doesn't map windows
21562151 // TODO: currently only notifications are handled here, other windows should be too
2157- switch_workspace_window_created_id = window_created. connect ((window) = > {
2152+ switch_workspace_window_created_id = get_display () . window_created. connect_after ((window) = > {
21582153 if (NotificationStack . is_notification (window)) {
2159- unowned var actor = (Meta . WindowActor ) window. get_compositor_private ();
2160- clutter_actor_reparent (actor, notification_group);
2161- notification_stack. show_notification (actor);
2154+ ulong window_shown_id = 0 ;
2155+ window_shown_id = window. shown. connect (() = > {
2156+ unowned var actor = (Meta . WindowActor ) window. get_compositor_private ();
2157+ clutter_actor_reparent (actor, notification_group);
2158+ notification_stack. show_notification (actor);
2159+
2160+ window. disconnect (window_shown_id);
2161+ });
21622162 }
21632163 });
21642164
@@ -2230,7 +2230,7 @@ namespace Gala {
22302230 private void switch_workspace_animation_finished (Meta . MotionDirection animation_direction,
22312231 bool cancel_action, bool is_nudge_animation = false ) {
22322232 if (switch_workspace_window_created_id > 0 ) {
2233- disconnect (switch_workspace_window_created_id);
2233+ get_display () . disconnect (switch_workspace_window_created_id);
22342234 switch_workspace_window_created_id = 0 ;
22352235 }
22362236 end_switch_workspace ();
0 commit comments