Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
16 changes: 7 additions & 9 deletions src/Misc/NotificationStack.vala
Original file line number Diff line number Diff line change
Expand Up @@ -163,17 +163,15 @@ public class Gala.NotificationStack : Object {
}
}

public void destroy_notification (Meta.WindowActor notification) {
notification.save_easing_state ();
notification.set_easing_duration (Utils.get_animation_duration (AnimationDuration.CLOSE));
notification.set_easing_mode (Clutter.AnimationMode.EASE_IN_QUAD);
notification.opacity = 0;

notification.x += stack_width;
notification.restore_easing_state ();

public async void destroy_notification (Meta.WindowActor notification) {
notifications.remove (notification);
update_positions ();

var builder = new TransitionBuilder (notification, AnimationDuration.CLOSE, EASE_IN_QUAD);
builder.add_property ("opacity", 0u);
builder.add_property ("x", notification.x + stack_width);

yield builder.run ();
}

/**
Expand Down
26 changes: 3 additions & 23 deletions src/WindowManager.vala
Original file line number Diff line number Diff line change
Expand Up @@ -1127,31 +1127,8 @@ namespace Gala {
}

public override void destroy (Meta.WindowActor actor) {
unowned var window = actor.get_meta_window ();

actor.remove_all_transitions ();

if (NotificationStack.is_notification (window)) {
if (Meta.Prefs.get_gnome_animations ()) {
destroying.add (actor);
}

notification_stack.destroy_notification (actor);

if (Meta.Prefs.get_gnome_animations ()) {
ulong destroy_handler_id = 0UL;
destroy_handler_id = actor.transitions_completed.connect (() => {
actor.disconnect (destroy_handler_id);
destroying.remove (actor);
destroy_completed (actor);
});
} else {
destroy_completed (actor);
}

return;
}

animate_destroy.begin (actor);
}

Expand Down Expand Up @@ -1186,6 +1163,9 @@ namespace Gala {
break;

default:
if (NotificationStack.is_notification (window)) {
yield notification_stack.destroy_notification (actor);
}
break;
}

Expand Down