34
submitted 10 months ago* (last edited 10 months ago) by Thorned_Rose@kbin.social to c/linux@lemmy.ml

Dunno if this is Wayland, Thunderbird, Firefox or KDE causing this issue but in the past few days I've been giving Wayland a go. Been much snappier and no issues but for Firefox not taking focus when I open web links in Thunderbird.

When I use Thunderbird with X and click on a link, Firefox will correctly grab focus and open the link.

Using Wayland, clicking a link in Thunderbird correctly opens the link in Firefox however Firefox stays minimised or drawn behind the other windows. My dock (KDE panel set to "Windows can cover") also does not pop up like it normally would if I've opened something but it's in the background. It stays hidden and I have to mouse over it to see that the Firefox icon is highlighted.

I've tried opening links from the Steam client and Firefox correctly takes focus from there so it so far seems to be just Thunderbird links not opening correctly in Firefox. I haven't been able to find anything in KDE's settings that would affect only Thunderbird.

EDIT (tested some different app combos):

Applications it correctly takes focus from: Pamac, Bottles, Calibre, Gnome Calculator, Gnome Evince Document Viewer, Steam, Strawberry Music Player

Applications it doesn't grab focus from: Thunderbird and Betterbird, Libreoffice (links in the About or URL links in a document), GIMP, Krita, Signal, Kdenlive, Darktable, VLC, QtAV QMLPlayer, Obsidian

I also tried Okular links but for some reason those opened in Chromium instead of Firefox (despite Firefox being set to default) but Chromium did take focus.

It's a minor annoyance but obviously I would like to fix it if possible and continue using Wayland given that, for me, it's noticeably faster than X.

OS: Arch Linux x86_64
Kernel: 6.6.10-arch1-1
DE: Plasma 5.27.10
WM: kwin
Display Server: Wayland 1.22.0-1
GPU: AMD ATI Radeon RX 6800 XT

Thunderbird 115.6.1, Firefox 121.0.1.

TIA!

top 11 comments
sorted by: hot top controversial new old
[-] xinayder@infosec.pub 5 points 10 months ago

The same issue happens to me when opening links from any app on Wayland. For example, every time I click a link on a Discord chat, I have to manually click on the Firefox window because the focus is not automatic.

[-] cdk@lemmy.ml 2 points 10 months ago

Same for me on Ubuntu 23.10. When I open a discord link I get a notification saying "Firefox is ready" instead of switching focus to firefox, and clicking that notification does not open Firefox.

[-] take6056@feddit.nl 2 points 10 months ago

Maybe Firefox, Thunderbird or Steam are running in XWayland and that causes different behaviour between them. Just guessing.

[-] Thorned_Rose@kbin.social 2 points 10 months ago

I thought that too but if you see my edits above, I tried several different app combos, and it's not consistent. I tried setting Chromium as my default browser (it opened all links and took focus correctly every time) and when I switched Firefox back to the default browser, Firefox didn't take focus from Steam even though it did originally 🤦🏻‍♀️

[-] azvasKvklenko@sh.itjust.works 2 points 10 months ago* (last edited 10 months ago)

I’m not sure about Thunderbird specifically, but it works with any apps (like Kitty terminal or Slack client) on Plasma Wayland session for me. You’ve got no reaction at all, or is the task manager icon at least turning orange for attention?

This used to be a problem few plasma versions back as there wasn’t any standardized protocol for this, and then it got stabilized and implemented https://wayland.app/protocols/xdg-activation-v1

Is your default web browser set properly (check default programs in system settings, you might try and set it to something else then back)? And how about the following:

xdg-open https://kde.org
[-] Thorned_Rose@kbin.social 1 points 10 months ago

The task manager icon does indeed correctly turn orange.

Default web browser is set properly. I tried setting it to Chromium and every single app I tested with Chromium, correctly opened and took focus with Chromium. Switched back to Firefox and once again it's not always taking focus. Only this time, when I tested Steam, Firefox didn't take focus from Steam even though it did before.

This definitely seems to be an issue with Firefox + Wayland given that Chromium had no issues opening up all the links from different apps I tried.

At least the issue is now whittled down a bit more. Thanks for your help!

[-] azvasKvklenko@sh.itjust.works 1 points 10 months ago

This probably works as intended, even of it’s not the desired behavior. Given that the protocol only allows clients to activate() the surface that needs attention and never mentions the actual window focus, it is up to the compositor (in this case Kwin) to decide what to do exactly with the request.

On a side note, I think this behavior should be configurable. I for one would not want windows to automatically focus ever (and Plasma even switches the virtual desktops when that happens), but I also see why someone would want to.

[-] the_q@lemmy.world -3 points 10 months ago
[-] Thorned_Rose@kbin.social 3 points 10 months ago

I'm not sure this is specifically a KDE/Plasma 5 issue though. Firefox correctly gets focus on X. But it also correctly gets focus on Wayland when opening URLs in Firefox from apps that aren't Thunderbird.
So far that I've found it's only a combination of Thunderbird, Firefox and Wayland.

[-] the_q@lemmy.world 1 points 10 months ago

Which version of Thunderbird are you running?

[-] Thorned_Rose@kbin.social 2 points 10 months ago

It's in my OP - Thunderbird 115.6.1 :)

this post was submitted on 14 Jan 2024
34 points (92.5% liked)

Linux

48080 readers
777 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS