DragDropAction: Release hovered reference when finishing the action (#1979)

This commit is contained in:
Corentin Noël 2024-07-10 11:55:02 +02:00 committed by GitHub
parent 7bb7908724
commit 78180827ba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -86,7 +86,7 @@ namespace Gala {
*/ */
public string drag_id { get; construct; } public string drag_id { get; construct; }
public Actor handle { get; private set; } public Actor? handle { get; private set; }
/** /**
* Indicates whether a drag action is currently active * Indicates whether a drag action is currently active
*/ */
@ -241,6 +241,7 @@ namespace Gala {
} else if (dragging) { } else if (dragging) {
if (hovered != null) { if (hovered != null) {
finish (); finish ();
hovered = null;
} else { } else {
cancel (); cancel ();
} }
@ -460,6 +461,7 @@ namespace Gala {
} }
dragging = false; dragging = false;
handle = null;
} }
private bool is_valid_touch_event (Clutter.Event event) { private bool is_valid_touch_event (Clutter.Event event) {