DragDropAction: Check that actor was actually clicked (#1591)

This commit is contained in:
Leo 2023-04-05 03:50:59 +09:00 committed by GitHub
parent 6da34ada40
commit c0a77ade59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -214,13 +214,15 @@ namespace Gala {
actor.get_transformed_position (out x, out y);
// release has happened within bounds of actor
if (x < ex && x + actor.width > ex && y < ey && y + actor.height > ey) {
if (clicked && x < ex && x + actor.width > ex && y < ey && y + actor.height > ey) {
actor_clicked (event.get_button ());
}
ungrab_actor ();
clicked = false;
dragging = false;
if (clicked) {
ungrab_actor ();
clicked = false;
}
return Gdk.EVENT_STOP;
} else if (dragging) {
if (hovered != null) {