[gnome-shell/wip/carlosg/osk-gesture-feedback: 4/8] edgeDragAction: Add signal to notify about progress
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/carlosg/osk-gesture-feedback: 4/8] edgeDragAction: Add signal to notify about progress
- Date: Fri, 12 Feb 2021 00:19:10 +0000 (UTC)
commit 204b92455996cdd07ece347f1b310e235be9d158
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Feb 11 14:15:25 2021 +0100
edgeDragAction: Add signal to notify about progress
js/ui/edgeDragAction.js | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/edgeDragAction.js b/js/ui/edgeDragAction.js
index 85021702cb..540ff4b9dd 100644
--- a/js/ui/edgeDragAction.js
+++ b/js/ui/edgeDragAction.js
@@ -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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]