mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-14 00:04:17 +09:00
Sync alt-tab menu with isolate workspaces settings
gh-2298
This commit is contained in:
@@ -35,6 +35,7 @@ import * as Utils from './utils.js'
|
||||
import * as DesktopIconsIntegration from './desktopIconsIntegration.js'
|
||||
import { DTP_EXTENSION, SETTINGS, tracker } from './extension.js'
|
||||
|
||||
import Gio from 'gi://Gio'
|
||||
import GLib from 'gi://GLib'
|
||||
import GObject from 'gi://GObject'
|
||||
import Clutter from 'gi://Clutter'
|
||||
@@ -100,6 +101,8 @@ export const PanelManager = class {
|
||||
|
||||
if (reset) return
|
||||
|
||||
this._syncAppSwitcherWorkspaceIsolation()
|
||||
|
||||
this.notificationsMonitor = new NotificationsMonitor()
|
||||
|
||||
this._desktopIconsUsableArea =
|
||||
@@ -265,6 +268,11 @@ export const PanelManager = class {
|
||||
})
|
||||
},
|
||||
],
|
||||
[
|
||||
SETTINGS,
|
||||
'changed::isolate-workspaces',
|
||||
this._syncAppSwitcherWorkspaceIsolation,
|
||||
],
|
||||
[
|
||||
Utils.DisplayWrapper.getMonitorManager(),
|
||||
'monitors-changed',
|
||||
@@ -406,6 +414,18 @@ export const PanelManager = class {
|
||||
this._desktopIconsUsableArea = null
|
||||
}
|
||||
|
||||
_syncAppSwitcherWorkspaceIsolation() {
|
||||
// alt-tab menu
|
||||
let appSwitcherSettings = new Gio.Settings({
|
||||
schema_id: 'org.gnome.shell.app-switcher',
|
||||
})
|
||||
|
||||
appSwitcherSettings.set_boolean(
|
||||
'current-workspace-only',
|
||||
SETTINGS.get_boolean('isolate-workspaces'),
|
||||
)
|
||||
}
|
||||
|
||||
_setDesktopIconsMargins() {
|
||||
this._desktopIconsUsableArea?.resetMargins()
|
||||
this.allPanels.forEach((p) => {
|
||||
|
||||
Reference in New Issue
Block a user