()
| 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(); |
no test coverage detected