diff --git a/js/ui/panel.js b/js/ui/panel.js index 94dffda73..cac922ac8 100644 --- a/js/ui/panel.js +++ b/js/ui/panel.js @@ -540,24 +540,16 @@ class Panel extends St.Widget { if (targetActor !== this) return Clutter.EVENT_PROPAGATE; - const [x, y] = event.get_coords(); + const [x, y_] = event.get_coords(); let dragWindow = this._getDraggableWindowForPosition(x); if (!dragWindow) return Clutter.EVENT_PROPAGATE; - const button = event.type() === Clutter.EventType.BUTTON_PRESS - ? event.get_button() : -1; - - return global.display.begin_grab_op( - dragWindow, + return dragWindow.begin_grab_op( Meta.GrabOp.MOVING, - false, /* pointer grab */ true, /* frame action */ - button, - event.get_state(), - event.get_time(), - x, y) ? Clutter.EVENT_STOP : Clutter.EVENT_PROPAGATE; + event.get_time()) ? Clutter.EVENT_STOP : Clutter.EVENT_PROPAGATE; } _onButtonPress(actor, event) {