panel: Use MetaWindow API to begin grab operation on window
Move away from MetaDisplay API. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2526>
This commit is contained in:
parent
238a17c6b5
commit
64d07ff7cd
@ -540,24 +540,16 @@ class Panel extends St.Widget {
|
|||||||
if (targetActor !== this)
|
if (targetActor !== this)
|
||||||
return Clutter.EVENT_PROPAGATE;
|
return Clutter.EVENT_PROPAGATE;
|
||||||
|
|
||||||
const [x, y] = event.get_coords();
|
const [x, y_] = event.get_coords();
|
||||||
let dragWindow = this._getDraggableWindowForPosition(x);
|
let dragWindow = this._getDraggableWindowForPosition(x);
|
||||||
|
|
||||||
if (!dragWindow)
|
if (!dragWindow)
|
||||||
return Clutter.EVENT_PROPAGATE;
|
return Clutter.EVENT_PROPAGATE;
|
||||||
|
|
||||||
const button = event.type() === Clutter.EventType.BUTTON_PRESS
|
return dragWindow.begin_grab_op(
|
||||||
? event.get_button() : -1;
|
|
||||||
|
|
||||||
return global.display.begin_grab_op(
|
|
||||||
dragWindow,
|
|
||||||
Meta.GrabOp.MOVING,
|
Meta.GrabOp.MOVING,
|
||||||
false, /* pointer grab */
|
|
||||||
true, /* frame action */
|
true, /* frame action */
|
||||||
button,
|
event.get_time()) ? Clutter.EVENT_STOP : Clutter.EVENT_PROPAGATE;
|
||||||
event.get_state(),
|
|
||||||
event.get_time(),
|
|
||||||
x, y) ? Clutter.EVENT_STOP : Clutter.EVENT_PROPAGATE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_onButtonPress(actor, event) {
|
_onButtonPress(actor, event) {
|
||||||
|
Loading…
Reference in New Issue
Block a user