From: James Bunton Date: Wed, 6 May 2020 13:19:07 +0000 (+1000) Subject: Hacks to work around gnome-shell popup-menu bug X-Git-Url: https://code.delx.au/show-app-menu-on-key-press/commitdiff_plain/fc351cc60b707853513217f510b7a0afed86e13c Hacks to work around gnome-shell popup-menu bug Steps to reproduce bug: - Open application overview - Right-click on an icon to open the popup menu - Now navigate to that icon with the keyboard - Press right Expected: Focus moves to the next icon Actual: Popup menu appears --- diff --git a/PKGBUILD b/PKGBUILD index 14f676c..0bd8b9f 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,12 +1,12 @@ # Maintainer: James Bunton pkgname=gnome-shell-extension-show-app-menu-on-key-press -pkgver=1 +pkgver=3 pkgrel=1 pkgdesc="Gnome shell extension to show app menu on key press" arch=('any') source=("extension.js" "metadata.json") -sha512sums=('31a9f17536791c0cb3bd055ffa95bed555fdc6d78d5a895d2c0e41fea3d496fd9966ba202344c38ae508e28d4fb3433c759ddb04c2148dcb402d92763a879543' +sha512sums=('bffe74753a8567e2c6500b6a1c21130f99b1e3dfe23613e10597abb80f3549ea1d6327db0e75961ab1ccdf013733fdc283dde94cee34c1f666de86f745339e91' 'b356481db946a42f4ab92823ad29aa568696a52bb286f219605878535f2e353e0f3f118636c9a66046c4130f6e094205dea666833c6b63b0950a339e4b468a02') package() { diff --git a/extension.js b/extension.js index 58c4076..6bad7ea 100644 --- a/extension.js +++ b/extension.js @@ -21,7 +21,13 @@ function disable() { function onStageKeyPress() { if (!hasVisibleWindows() && !Main.overview.visible) { Main.overview.viewSelector.showApps(); - Main.overview.viewSelector.appDisplay._showView(Views.FREQUENT); + const appDisplay = Main.overview.viewSelector.appDisplay; + const view = appDisplay._views[Views.FREQUENT].view; + view._grid.destroyAll() + view._items = new Map(); + view._orderedItems = []; + view._redisplay(); + appDisplay._showView(Views.FREQUENT); Main.overview.viewSelector._activePage.navigate_focus(null, St.DirectionType.TAB_FORWARD, false); } }