mirror of
https://github.com/elementary/gala.git
synced 2024-12-24 17:53:19 +03:00
DragDropAction: pass correct coordinates to drag_begin
(#1791)
This commit is contained in:
parent
87a47fa364
commit
aa1dc31a1d
@ -291,7 +291,7 @@ namespace Gala {
|
||||
if (!dragging && clicked) {
|
||||
var drag_threshold = Clutter.Settings.get_default ().dnd_drag_threshold;
|
||||
if (Math.fabsf (last_x - x) > drag_threshold || Math.fabsf (last_y - y) > drag_threshold) {
|
||||
handle = drag_begin (x, y);
|
||||
handle = drag_begin (last_x, last_y);
|
||||
if (handle == null) {
|
||||
ungrab_actor ();
|
||||
critical ("No handle has been returned by the started signal, aborting drag.");
|
||||
|
@ -669,8 +669,10 @@ public class Gala.WindowClone : Clutter.Actor {
|
||||
window_icon.save_easing_state ();
|
||||
window_icon.set_easing_duration (duration);
|
||||
window_icon.set_easing_mode (Clutter.AnimationMode.EASE_IN_OUT_CUBIC);
|
||||
window_icon.set_position (click_x - (abs_x + prev_parent_x) - window_icon.width / 2,
|
||||
click_y - (abs_y + prev_parent_y) - window_icon.height / 2);
|
||||
window_icon.set_position (
|
||||
click_x - (abs_x + prev_parent_x) - window_icon.width / 2,
|
||||
click_y - (abs_y + prev_parent_y) - window_icon.height / 2
|
||||
);
|
||||
window_icon.restore_easing_state ();
|
||||
|
||||
close_button.opacity = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user