Skip to content

Commit

Permalink
Fix extension menu appearing under Background Apps
Browse files Browse the repository at this point in the history
  • Loading branch information
AzzamAlsharafi committed Apr 27, 2023
1 parent e1c416d commit 044606f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"shell-version": [
"42", "43", "44"
],
"version": 8,
"version": 9,
"settings-schema": "org.gnome.shell.extensions.ideapad-Controls"
}
9 changes: 9 additions & 0 deletions quickSettingsMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ const GObject = imports.gi.GObject;
const Gio = imports.gi.Gio;
const Main = imports.ui.main;

const Config = imports.misc.config;
const [major] = Config.PACKAGE_VERSION.split(".");
const shellVersion = Number.parseInt(major);

const ExtensionUtils = imports.misc.extensionUtils;
const Me = ExtensionUtils.getCurrentExtension();
const Common = Me.imports.common;
Expand Down Expand Up @@ -34,6 +38,11 @@ var SystemMenu = GObject.registerClass(

QuickSettingsMenu.menu.addItem(this.toggleMenu);

if (shellVersion >= 44) {
// Move toggleMenu above Background Apps item. (GNOME 44)
QuickSettingsMenu.menu._grid.set_child_below_sibling(this.toggleMenu, QuickSettingsMenu._backgroundApps.quickSettingsItems[0]);
}

Common.addOptionsToMenu(this.toggleMenu.menu);
}

Expand Down

0 comments on commit 044606f

Please sign in to comment.