mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
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
1 changed files with 10 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue