WindowSwitcher: Fix memory leak (#1972)

This commit is contained in:
Leo 2024-07-08 08:55:54 +09:00 committed by GitHub
parent 6141d2d402
commit 812caffd6f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -356,9 +356,9 @@ public class Gala.WindowSwitcher : CanvasActor {
private void add_icon (WindowSwitcherIcon icon) {
container.add_child (icon);
icon.motion_event.connect (() => {
if (current_icon != icon && !handling_gesture) {
current_icon = icon;
icon.motion_event.connect ((_icon, event) => {
if (current_icon != _icon && !handling_gesture) {
current_icon = (WindowSwitcherIcon) _icon;
}
return Clutter.EVENT_PROPAGATE;