MCPcopy
hub / github.com/domferr/tilingshell / enable

Method enable

src/extension.ts:115–187  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

113 }
114
115 enable(): void {
116 if (this._signals) this._signals.disconnect();
117 this._signals = new SignalHandling();
118
119 Settings.initialize(this.getSettings());
120 if (Settings.LAST_VERSION_NAME_INSTALLED === '0') {
121 this._onInstall();
122
123 // Setting used for compatibility changes if necessary
124 if (this.metadata['version-name']) {
125 Settings.LAST_VERSION_NAME_INSTALLED =
126 this.metadata['version-name'] || '0';
127 }
128 }
129
130 this._validateSettings();
131
132 // force initialization and tracking of windows
133 TilingShellWindowManager.get();
134
135 this._fractionalScalingEnabled = this._isFractionalScalingEnabled(
136 new Gio.Settings({ schema: 'org.gnome.mutter' }),
137 );
138
139 if (this._keybindings) this._keybindings.destroy();
140 this._keybindings = new KeyBindings(this.getSettings());
141
142 // disable native edge tiling
143 if (Settings.ACTIVE_SCREEN_EDGES) {
144 SettingsOverride.get().override(
145 new Gio.Settings({ schemaId: 'org.gnome.mutter' }),
146 'edge-tiling',
147 new GLib.Variant('b', false),
148 );
149 }
150
151 if (Main.layoutManager._startingUp) {
152 this._signals.connect(
153 Main.layoutManager,
154 'startup-complete',
155 () => {
156 this._createTilingManagers();
157 this._setupSignals();
158 },
159 );
160 } else {
161 this._createTilingManagers();
162 this._setupSignals();
163 }
164
165 this._resizingManager = new ResizingManager();
166 this._resizingManager.enable();
167
168 if (this._windowBorderManager) this._windowBorderManager.destroy();
169 this._windowBorderManager = new WindowBorderManager(
170 !this._fractionalScalingEnabled,
171 );
172 this._windowBorderManager.enable();

Callers 3

createIndicatorMethod · 0.45
_createTilingManagersMethod · 0.45
_setupSignalsMethod · 0.45

Calls 13

_onInstallMethod · 0.95
_validateSettingsMethod · 0.95
_createTilingManagersMethod · 0.95
_setupSignalsMethod · 0.95
createIndicatorMethod · 0.95
initializeMethod · 0.80
overrideMethod · 0.80
destroyMethod · 0.65
disconnectMethod · 0.45
getMethod · 0.45
connectMethod · 0.45

Tested by

no test coverage detected