main: Use the correct schema for 'dynamic-workspaces'
We currently monitor the shell's override schema for changes to the 'dynamic-workspaces' key, which ends up being the wrong schema in classic mode. With the new ability to use mode-specific overides, we can finally fix this. https://bugzilla.gnome.org/show_bug.cgi?id=701717
This commit is contained in:
parent
36b1cd13c9
commit
3ff194247a
@ -38,7 +38,6 @@ const Magnifier = imports.ui.magnifier;
|
||||
const XdndHandler = imports.ui.xdndHandler;
|
||||
const Util = imports.misc.util;
|
||||
|
||||
const OVERRIDES_SCHEMA = 'org.gnome.shell.overrides';
|
||||
const DEFAULT_BACKGROUND_COLOR = Clutter.Color.from_pixel(0x2e3436ff);
|
||||
|
||||
let componentManager = null;
|
||||
@ -68,7 +67,7 @@ let layoutManager = null;
|
||||
let _startDate;
|
||||
let _defaultCssStylesheet = null;
|
||||
let _cssStylesheet = null;
|
||||
let _overridesSettings = null;
|
||||
let _workspacesSettings = null;
|
||||
|
||||
function _sessionUpdated() {
|
||||
_loadDefaultStylesheet();
|
||||
@ -119,6 +118,15 @@ function _initializePrefs() {
|
||||
let keys = new Gio.Settings({ schema: sessionMode.overridesSchema }).list_keys();
|
||||
for (let i = 0; i < keys.length; i++)
|
||||
Meta.prefs_override_preference_schema (keys[i], sessionMode.overridesSchema);
|
||||
|
||||
let workspacesSchema;
|
||||
if (keys.indexOf('dynamic-workspaces') > -1)
|
||||
workspacesSchema = sessionMode.overridesSchema;
|
||||
else
|
||||
workspacesSchema = 'org.gnome.mutter';
|
||||
|
||||
_workspacesSettings = new Gio.Settings({ schema: workspacesSchema });
|
||||
_workspacesSettings.connect('changed::dynamic-workspaces', _queueCheckWorkspaces);
|
||||
}
|
||||
|
||||
function _initializeUI() {
|
||||
@ -186,9 +194,6 @@ function _initializeUI() {
|
||||
Scripting.runPerfScript(module, perfOutput);
|
||||
}
|
||||
|
||||
_overridesSettings = new Gio.Settings({ schema: OVERRIDES_SCHEMA });
|
||||
_overridesSettings.connect('changed::dynamic-workspaces', _queueCheckWorkspaces);
|
||||
|
||||
global.screen.connect('notify::n-workspaces', _nWorkspacesChanged);
|
||||
|
||||
global.screen.connect('window-entered-monitor', _windowEnteredMonitor);
|
||||
|
Loading…
Reference in New Issue
Block a user