From c0a77ade59fe001aa74d047469aed89b4b908352 Mon Sep 17 00:00:00 2001 From: Leo Date: Wed, 5 Apr 2023 03:50:59 +0900 Subject: [PATCH] DragDropAction: Check that actor was actually clicked (#1591) --- lib/DragDropAction.vala | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/DragDropAction.vala b/lib/DragDropAction.vala index ff735975..9e098ae8 100644 --- a/lib/DragDropAction.vala +++ b/lib/DragDropAction.vala @@ -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) {