edgeDragAction: Add signal to notify about progress
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1668>
This commit is contained in:
parent
8e73143b24
commit
a6a4e0a504
@ -9,7 +9,10 @@ var EDGE_THRESHOLD = 20;
|
||||
var DRAG_DISTANCE = 80;
|
||||
|
||||
var EdgeDragAction = GObject.registerClass({
|
||||
Signals: { 'activated': {} },
|
||||
Signals: {
|
||||
'activated': {},
|
||||
'progress': { param_types: [GObject.TYPE_DOUBLE] },
|
||||
},
|
||||
}, class EdgeDragAction extends Clutter.GestureAction {
|
||||
_init(side, allowedModes) {
|
||||
super._init();
|
||||
@ -60,6 +63,12 @@ var EdgeDragAction = GObject.registerClass({
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this._side === St.Side.TOP ||
|
||||
this._side === St.Side.BOTTOM)
|
||||
this.emit('progress', offsetY);
|
||||
else
|
||||
this.emit('progress', offsetX);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user