[gnome-shell/wip/carlosg/fix-warning] workspacesView: sync gesture enabled state after setting it up completely
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/carlosg/fix-warning] workspacesView: sync gesture enabled state after setting it up completely
- Date: Fri, 19 Apr 2019 16:58:03 +0000 (UTC)
commit 31a2c6f5612259434d69046ba19f664820e27a3c
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Apr 19 18:52:53 2019 +0200
workspacesView: sync gesture enabled state after setting it up completely
At the point it is disabled, it has got signal handlers connected but
this._workspacesView is uninitialized. This triggers:
(gnome-shell:3993): Gjs-WARNING **: 18:49:53.281: JS ERROR: Exception in callback for signal: cancel:
TypeError: this._workspacesViews is undefined
_endTouchGesture@resource:///org/gnome/shell/ui/workspacesView.js:527:25
_emit@resource:///org/gnome/gjs/modules/signals.js:142:27
set enabled@resource:///org/gnome/shell/ui/windowManager.js:478:13
WorkspacesDisplay<@resource:///org/gnome/shell/ui/workspacesView.js:482:9
ViewSelector<@resource:///org/gnome/shell/ui/viewSelector.js:167:35
ControlsManager<@resource:///org/gnome/shell/ui/overviewControls.js:405:29
init@resource:///org/gnome/shell/ui/overview.js:234:26
_initializeUI@resource:///org/gnome/shell/ui/main.js:184:5
start@resource:///org/gnome/shell/ui/main.js:124:5
@<main>:1:31
On startup. Shuffling these two lines prevent this from happening.
js/ui/workspacesView.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js
index f63178167..fe06d9dae 100644
--- a/js/ui/workspacesView.js
+++ b/js/ui/workspacesView.js
@@ -479,12 +479,12 @@ var WorkspacesDisplay = class {
this.actor.connect('notify::mapped', () => {
switchGesture.enabled = this.actor.mapped;
});
- switchGesture.enabled = this.actor.mapped;
this._primaryIndex = Main.layoutManager.primaryIndex;
this._workspacesViews = [];
this._primaryScrollAdjustment = null;
+ switchGesture.enabled = this.actor.mapped;
this._settings = new Gio.Settings({ schema_id: MUTTER_SCHEMA });
this._settings.connect('changed::workspaces-only-on-primary',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]