Skip to content

Commit d8a5990

Browse files
committed
fix the issue that the session list is empty on Gnome 45
1 parent 4af059b commit d8a5990

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

indicator.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import Gio from 'gi://Gio';
66
import GLib from 'gi://GLib';
77
import Shell from 'gi://Shell';
88
import Meta from 'gi://Meta';
9+
import Clutter from 'gi://Clutter';
10+
911

1012
import * as PopupMenu from 'resource:///org/gnome/shell/ui/popupMenu.js';
1113
import * as PanelMenu from 'resource:///org/gnome/shell/ui/panelMenu.js';
@@ -294,7 +296,10 @@ class AwsIndicator extends PanelMenu.Button {
294296
style_class: 'session-menu-section',
295297
overlay_scrollbars: true
296298
});
297-
scrollView.add_child(this._sessionsMenuSection.actor);
299+
300+
// Clutter.Container was removed from Gnome 46, see:
301+
// https://gjs.guide/extensions/upgrading/gnome-shell-46.html
302+
scrollView[Clutter.Container ? 'add_actor' : 'set_child'](this._sessionsMenuSection.actor);
298303
this._scrollableSessionsMenuSection.actor.add_child(scrollView);
299304

300305
this.menu.addMenuItem(this._scrollableSessionsMenuSection);

0 commit comments

Comments
 (0)