Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/InternalUtils.vala
Original file line number Diff line number Diff line change
Expand Up @@ -355,5 +355,17 @@ namespace Gala {
return Source.REMOVE;
});
}

public static void wait_for_window_actor_to_show (Meta.Window window, owned WindowActorReadyCallback callback) {
unowned var window_actor = (Meta.WindowActor) window.get_compositor_private ();
if (window_actor.visible) {
callback (window_actor);
return;
}

InternalUtils.wait_for_window_actor (window, (actor) => {
actor.show.connect (() => callback (actor));
});
}
}
}
7 changes: 4 additions & 3 deletions src/WindowManager.vala
Original file line number Diff line number Diff line change
Expand Up @@ -2120,9 +2120,10 @@ namespace Gala {
// TODO: currently only notifications are handled here, other windows should be too
switch_workspace_window_created_id = window_created.connect ((window) => {
if (NotificationStack.is_notification (window)) {
unowned var actor = (Meta.WindowActor) window.get_compositor_private ();
clutter_actor_reparent (actor, notification_group);
notification_stack.show_notification (actor);
InternalUtils.wait_for_window_actor_to_show (window, (actor) => {
clutter_actor_reparent (actor, notification_group);
notification_stack.show_notification (actor);
});
}
});

Expand Down
Loading