File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -355,5 +355,17 @@ namespace Gala {
355355 return Source . REMOVE ;
356356 });
357357 }
358+
359+ public static void wait_for_window_actor_to_show (Meta . Window window, owned WindowActorReadyCallback callback) {
360+ unowned var window_actor = (Meta . WindowActor ) window. get_compositor_private ();
361+ if (window_actor. visible) {
362+ callback (window_actor);
363+ return ;
364+ }
365+
366+ InternalUtils . wait_for_window_actor (window, (actor) = > {
367+ actor. show. connect (() = > callback (actor));
368+ });
369+ }
358370 }
359371}
Original file line number Diff line number Diff line change @@ -2120,9 +2120,10 @@ namespace Gala {
21202120 // TODO: currently only notifications are handled here, other windows should be too
21212121 switch_workspace_window_created_id = window_created. connect ((window) = > {
21222122 if (NotificationStack . is_notification (window)) {
2123- unowned var actor = (Meta . WindowActor ) window. get_compositor_private ();
2124- clutter_actor_reparent (actor, notification_group);
2125- notification_stack. show_notification (actor);
2123+ InternalUtils . wait_for_window_actor_to_show (window, (actor) = > {
2124+ clutter_actor_reparent (actor, notification_group);
2125+ notification_stack. show_notification (actor);
2126+ });
21262127 }
21272128 });
21282129
You can’t perform that action at this time.
0 commit comments