mirror of
https://github.com/elementary/gala.git
synced 2024-09-11 15:15:39 +03:00
Map notification windows manually while switching workspace (#1577)
This commit is contained in:
parent
b7139add23
commit
97b33173e2
@ -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;
|
||||
@ -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;
|
||||
@ -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 ();
|
||||
|
Loading…
Reference in New Issue
Block a user