Opening HTTP Links With Focus From Non-Browser Apps

Hi All,

I have hopefully a simple question, but I’ve been unable to find the solution or the right string of terms to fix the issue. I cannot figure out how to make KDE open HTTP links in an existing browser window while raising the browser to the front.

Current Behavior: In Discord or Lutris, when I click a link to open a new browser tab, the browser tab opens in the background.

Desired Behavior: I would like to force these links to open in the foreground and raise the browser to the front.

On Gnome, the default behavior is the same. However, there is an extension titled “Focus my Window” found here: Focus my window - GNOME Shell Extensions which implements the behavior I’m seeking.

I’m running the most recent version of the KDE Fedora spin on Wayland.

Is there a way to change the default KDE behavior to bring the browser window forward?

Thanks for the help, and feel free to point me to a solution if someone has already typed on out.

1 Like

This happens because the either the activating app or the app being activated does not implement the Wayland-specific activation protocol (xdg_activation_v1). Both need to correctly implement the protocol.

It’s the same on X11, but apps have had decades to get this right; on Wayland, the protocol is still rather new and a lot of apps don’t yet have support for it. They should. :slight_smile: So you should report this to the developers of those apps.

5 Likes

Just pointing this out: I haven’t used GNOME for a few months, but I clearly remember GNOME on Wayland displaying a notification like “Firefox is ready” when clicking a URL from another app. Clicking on that notification would bring the window forward/take you to the FF window’s workspace (virtual desktop).

This worked in apps like Discord, so I’m not sure why it can’t also work here. Maybe GNOME has some hacks built in for apps? Or maybe the apps actually do implement the correct portal but it doesn’t work on KDE for some reason?

(Side note: It’s also possible that Firefox & Discord were running in XWayland or something and I just didn’t remember that fact. If anyone is interested, I can do some investigation on my laptop which still has GNOME on it.)