Skip to content

Commit ee13744

Browse files
committed
extension: Initialize and tear down OverflowManager
The overflow manager is a singleton that the icon and the preferences code expect to find via `OverflowManager.getDefault()`. Without an explicit `initialize()` call at extension startup the manager would lazily appear only after the first icon registration race-wins, and could be left holding GSettings signal handlers if the extension is disabled while a tray session is active. Wire its lifecycle to the extension's `enable()`/`disable()` hooks, mirroring the pattern already used for `TrayIconsManager`, so reloads and lock-screen toggles always start with a clean manager and never leak handlers.
1 parent 6eed004 commit ee13744

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

extension.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import * as Extension from 'resource:///org/gnome/shell/extensions/extension.js'
1818

1919
import * as StatusNotifierWatcher from './statusNotifierWatcher.js';
2020
import * as Interfaces from './interfaces.js';
21+
import * as OverflowManager from './overflowManager.js';
2122
import * as TrayIconsManager from './trayIconsManager.js';
2223
import * as Util from './util.js';
2324
import {Logger} from './logger.js';
@@ -54,13 +55,15 @@ export default class AppIndicatorExtension extends Extension.Extension {
5455
this._isEnabled = true;
5556
SettingsManager.initialize(this);
5657
Util.tryCleanupOldIndicators();
58+
OverflowManager.OverflowManager.initialize();
5759
this._maybeEnableAfterNameAvailable();
5860
TrayIconsManager.TrayIconsManager.initialize();
5961
}
6062

6163
disable() {
6264
this._isEnabled = false;
6365
TrayIconsManager.TrayIconsManager.destroy();
66+
OverflowManager.OverflowManager.destroy();
6467

6568
if (this._statusNotifierWatcher !== null) {
6669
this._statusNotifierWatcher.destroy();

0 commit comments

Comments
 (0)