[gnome-shell/wip/carlosg/osk-gesture-feedback: 26/31] 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: 26/31] edgeDragAction: Add signal to notify about progress
- Date: Tue, 16 Feb 2021 13:49:20 +0000 (UTC)
commit 33dc10ea09991e841c1b132aafdcf19e7bfceda3
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]