]> code.delx.au - show-app-menu-on-key-press/commitdiff
Hacks to work around gnome-shell popup-menu bug
authorJames Bunton <jamesbunton@delx.net.au>
Wed, 6 May 2020 13:19:07 +0000 (23:19 +1000)
committerJames Bunton <jamesbunton@delx.net.au>
Wed, 6 May 2020 13:30:42 +0000 (23:30 +1000)
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

PKGBUILD
extension.js

index 14f676c8543162500c75ea0df2fd870cbc75daa2..0bd8b9f870f9fe10d7d19a36c30fdc29a6ce7e2b 100644 (file)
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,12 +1,12 @@
 # Maintainer: James Bunton <jamesbunton@delx.net.au>
 
 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() {
index 58c40761d1d32b081962a9f9d86bba654e345547..6bad7ea8dcac98e147eb3d55c72d46a618f13e95 100644 (file)
@@ -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);
     }
 }