[gnome-shell/wip/exalm/2151: 2/2] workspacesView: Disable swipe tracker during window dragging
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/exalm/2151: 2/2] workspacesView: Disable swipe tracker during window dragging
- Date: Tue, 28 Jan 2020 19:12:38 +0000 (UTC)
commit 1736047cd6d5ad149397a9e17956b5c8a13fd201
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date: Wed Jan 29 00:08:32 2020 +0500
workspacesView: Disable swipe tracker during window dragging
Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/2151
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/966
js/ui/workspacesView.js | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
---
diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js
index 2dd1ae4909..01d1deb3ab 100644
--- a/js/ui/workspacesView.js
+++ b/js/ui/workspacesView.js
@@ -428,6 +428,13 @@ class WorkspacesDisplay extends St.Widget {
this._swipeTracker.connect('end', this._switchWorkspaceEnd.bind(this));
this.bind_property('mapped', this._swipeTracker, 'enabled', GObject.BindingFlags.SYNC_CREATE);
+ this._windowDragBeginId =
+ Main.overview.connect('window-drag-begin',
+ this._windowDragBegin.bind(this));
+ this._windowDragEndId =
+ Main.overview.connect('window-drag-begin',
+ this._windowDragEnd.bind(this));
+
this._primaryIndex = Main.layoutManager.primaryIndex;
this._workspacesViews = [];
@@ -470,6 +477,16 @@ class WorkspacesDisplay extends St.Widget {
global.window_manager.disconnect(this._switchWorkspaceId);
global.workspace_manager.disconnect(this._reorderWorkspacesdId);
+ Main.overview.disconnect(this._windowDragBeginId);
+ Main.overview.disconnect(this._windowDragEndId);
+ }
+
+ _windowDragBegin() {
+ this._swipeTracker.enabled = false;
+ }
+
+ _windowDragEnd() {
+ this._swipeTracker.enabled = true;
}
_workspacesReordered() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]