mirror of
https://github.com/elementary/gala.git
synced 2024-09-11 07:05:30 +03:00
DragDropAction: Check that actor was actually clicked (#1591)
This commit is contained in:
parent
6da34ada40
commit
c0a77ade59
@ -214,13 +214,15 @@ namespace Gala {
|
|||||||
actor.get_transformed_position (out x, out y);
|
actor.get_transformed_position (out x, out y);
|
||||||
|
|
||||||
// release has happened within bounds of actor
|
// 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 ());
|
actor_clicked (event.get_button ());
|
||||||
}
|
}
|
||||||
|
|
||||||
ungrab_actor ();
|
if (clicked) {
|
||||||
clicked = false;
|
ungrab_actor ();
|
||||||
dragging = false;
|
clicked = false;
|
||||||
|
}
|
||||||
|
|
||||||
return Gdk.EVENT_STOP;
|
return Gdk.EVENT_STOP;
|
||||||
} else if (dragging) {
|
} else if (dragging) {
|
||||||
if (hovered != null) {
|
if (hovered != null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user