(feat) Enable swipe actions for workspace navigation

This commit is contained in:
mr. M
2024-11-09 18:52:22 +01:00
parent e2e46d675e
commit 7a91ea7107
2 changed files with 7 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@@ -47,8 +47,10 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
await this.initializeWorkspaces();
console.info('ZenWorkspaces: ZenWorkspaces initialized');
this.initializeGestureHandlers();
this.initializeWorkspaceNavigation();
if (Services.prefs.getBoolPref('zen.workspaces.swipe-actions', false) && this.workspaceEnabled) {
this.initializeGestureHandlers();
this.initializeWorkspaceNavigation();
}
Services.obs.addObserver(this, 'weave:engine:sync:finish');
}
@@ -802,7 +804,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
if (!this.workspaceEnabled) {
return;
}
let target = event.target.closest("#zen-current-workspace-indicator") ? event.target : document.getElementById('zen-workspaces-button');
let target = event.target.closest("#zen-current-workspace-indicator") || document.getElementById('zen-workspaces-button');
let panel = document.getElementById('PanelUI-zen-workspaces');
await this._propagateWorkspaceData({
ignoreStrip: true,