Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map notification windows manually while switching workspace #1577

Merged
merged 4 commits into from Mar 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/WindowManager.vala
Expand Up @@ -109,6 +109,8 @@ namespace Gala {
private GLib.Settings animations_settings;
private GLib.Settings behavior_settings;

private ulong workspace_switching_window_created_id = 0;

private GestureTracker gesture_tracker;
private bool animating_switch_workspace = false;
private bool switch_workspace_with_gesture = false;
Expand Down Expand Up @@ -1886,6 +1888,20 @@ namespace Gala {
}
}


workspace_switching_window_created_id = display.window_created.connect ((window) => {
if (window.window_type == Meta.WindowType.NOTIFICATION) {
unowned var actor = (Meta.WindowActor) window.get_compositor_private ();
// while a workspace is being switched mutter doesn't map windows
// TODO: currently only notifications are handled here, other windows should be too
notification_stack.show_notification (actor, enable_animations);

windows.prepend (actor);
parents.prepend (actor.get_parent ());
reparent_notification_window (actor, static_windows);
}
});

main_container.clip_to_allocation = true;
main_container.x = move_primary_only ? monitor_geom.x : 0.0f;
main_container.y = move_primary_only ? monitor_geom.y : 0.0f;
Expand Down Expand Up @@ -2051,6 +2067,8 @@ namespace Gala {
}
}

display.disconnect (workspace_switching_window_created_id);

if (tmp_actors != null) {
foreach (var actor in tmp_actors) {
actor.destroy ();
Expand Down