Skip to content

GNOME 48: Cannot open/switch apps using the launcher #1775

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
j1nxie opened this issue Mar 27, 2025 · 6 comments
Open

GNOME 48: Cannot open/switch apps using the launcher #1775

j1nxie opened this issue Mar 27, 2025 · 6 comments

Comments

@j1nxie
Copy link

j1nxie commented Mar 27, 2025

After updating to GNOME 48, alongside updating both pop-launcher and pop-shell to their latest git versions, I don't seem to be able to open/switch apps using the launcher. When enabling logs for pop-shell and checking journalctl, here is what I get when I attempt to hit Enter to open/switch apps:

Mar 27 10:50:47 adachi gnome-shell[269225]: pop-shell: [ERROR] failed to create SearchOption: TypeError: this.scroller.get_vscroll_bar is not a function
Mar 27 10:50:47 adachi gnome-shell[269225]: pop-shell: [ERROR] failed to create SearchOption: TypeError: this.scroller.get_vscroll_bar is not a function
Mar 27 10:50:47 adachi gnome-shell[269225]: pop-shell: [ERROR] failed to create SearchOption: TypeError: this.scroller.get_vscroll_bar is not a function
Mar 27 10:50:48 adachi gnome-shell[269225]: pop-shell: [ERROR] failed to create SearchOption: TypeError: this.scroller.get_vscroll_bar is not a function
Mar 27 10:50:48 adachi gnome-shell[269225]: pop-shell: [ERROR] failed to create SearchOption: TypeError: this.scroller.get_vscroll_bar is not a function
Mar 27 10:50:48 adachi gnome-shell[269225]: pop-shell: [ERROR] failed to create SearchOption: TypeError: this.scroller.get_vscroll_bar is not a function
Mar 27 10:50:48 adachi gnome-shell[269225]: pop-shell: [ERROR] failed to create SearchOption: TypeError: this.scroller.get_vscroll_bar is not a function
Mar 27 10:50:48 adachi gnome-shell[269225]: pop-shell: [ERROR] failed to create SearchOption: TypeError: this.scroller.get_vscroll_bar is not a function
Mar 27 10:50:48 adachi gnome-shell[269225]: pop-shell: [ERROR] failed to create SearchOption: TypeError: this.scroller.get_vscroll_bar is not a function
Mar 27 10:50:48 adachi gnome-shell[269225]: pop-shell: [ERROR] failed to create SearchOption: TypeError: this.scroller.get_vscroll_bar is not a function
Mar 27 10:50:48 adachi gnome-shell[269225]: pop-shell: [ERROR] failed to create SearchOption: TypeError: this.scroller.get_vscroll_bar is not a function
Mar 27 10:50:48 adachi gnome-shell[269225]: pop-shell: [INFO] stopping pop-launcher services
@csszialta
Copy link

csszialta commented Mar 27, 2025

I was actually just looking into this as well! I noticed the same errors in journalctl and ended up grepping the function call and found it in /usr/share/gnome-shell/extensions/[email protected]/search.js in my system. I commented out the following lines

shell/src/search.ts

Lines 376 to 381 in b3fc425

const vscroll = (this.scroller as any).get_vscroll_bar();
if ((this.scroller as any).vscrollbar_visible) {
vscroll.show();
} else {
vscroll.hide();
}
since they just seem to make a vertical scrollbar visible. After restarting, my launcher was working again.

I looked into why this was happening and discovered that the function call was removed in the library recently as part of cleanups for Gnome 48: https://gitlab.gnome.org/GNOME/gnome-shell/-/commit/794f0bcc75dbca4090f17e0f3a1f0c08840ef871#fb34343b30180ae68460b95e6ce5e969e3997534.

I haven't had a chance to take a closer look on how to restore the original functionality to work with Gnome 48 (tbh, I never noticed a vertical scrollbar before, but I've only been using pop-shell for a few weeks).

As far as I understand, this repo is no longer being kept up to date with newer Gnome releases, so I'm not sure what the process is for establishing a Gnome 48+ branch for fixes like this.

@j1nxie
Copy link
Author

j1nxie commented Mar 27, 2025

I haven't had a chance to take a closer look on how to restore the original functionality to work with Gnome 48 (tbh, I never noticed a vertical scrollbar before, but I've only been using pop-shell for a few weeks).

Honestly, neither have I - despite using pop-shell and the integrated launcher frontend for a good bit of my time!

As far as I understand, this repo is no longer being kept up to date with newer Gnome releases, so I'm not sure what the process is for establishing a Gnome 48+ branch for fixes like this.

I still see commits that are adding GNOME 48 support to the metadata as well as code fixes so I guess there might be a chance of it happening? Not too sure myself - I'm not particularly knowledgeable in developing GNOME extensions as well as what's happening.

@spatels
Copy link

spatels commented Apr 14, 2025

This patch gets the app launcher working again for opening/switching apps in GNOME 48

diff --git a/src/search.ts b/src/search.ts
index 0d7a45f..f93775a 100644
--- a/src/search.ts
+++ b/src/search.ts
@@ -373,12 +373,8 @@ export class Search {
 
         this.list.show();
 
-        const vscroll = (this.scroller as any).get_vscroll_bar();
-        if ((this.scroller as any).vscrollbar_visible) {
-            vscroll.show();
-        } else {
-            vscroll.hide();
-        }
+        // Show vertical scrollbar only when needed, hide horizontal always
+        this.scroller.set_policy(St.PolicyType.NEVER, St.PolicyType.AUTOMATIC);
 
         if (id === 0) {
             GLib.idle_add(GLib.PRIORITY_DEFAULT, () => {

I hope it helps :)

@dagimg-dot
Copy link

  •    // Show vertical scrollbar only when needed, hide horizontal always
    
  •    this.scroller.set_policy(St.PolicyType.NEVER, St.PolicyType.AUTOMATIC);
    

Property set_policy does not exist on type "Widget"

@spatels
Copy link

spatels commented Apr 16, 2025

Hello @dagimg-dot, thank you for trying out the patch. I'm unable to reproduce the error you're describing. set_policy is a method specific to St.ScrollView, which, while it does inherit from St.Widget, isn't a direct method of the Widget class.

For detailed information, please refer to the documentation here: https://gnome.pages.gitlab.gnome.org/gnome-shell/st/method.ScrollView.set_policy.html

It's possible, though I'm only speculating, that the error might be related to this.scroller not being an St.ScrollView instance in your case, or perhaps a scope or environment-related issue.

@edward-tecky
Copy link

edward-tecky commented Apr 18, 2025

This patch gets the app launcher working again for opening/switching apps in GNOME 48

diff --git a/src/search.ts b/src/search.ts
index 0d7a45f..f93775a 100644
--- a/src/search.ts
+++ b/src/search.ts
@@ -373,12 +373,8 @@ export class Search {
 
         this.list.show();
 
-        const vscroll = (this.scroller as any).get_vscroll_bar();
-        if ((this.scroller as any).vscrollbar_visible) {
-            vscroll.show();
-        } else {
-            vscroll.hide();
-        }
+        // Show vertical scrollbar only when needed, hide horizontal always
+        this.scroller.set_policy(St.PolicyType.NEVER, St.PolicyType.AUTOMATIC);
 
         if (id === 0) {
             GLib.idle_add(GLib.PRIORITY_DEFAULT, () => {

I hope it helps :)

I've been using the dnf-packaged on Fedora 42 (pop-launcher.x86_64 1.2.3^git20250129.0e01b09-1.fc42). Can confirm that pop-launcher on Gnome 48 resumes launching apps after making these changes.

Thank you for your help! It's aesthetically essential to my setup with Pop Shell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants