qbittorrent / qBittorrent

qBittorrent BitTorrent client
https://www.qbittorrent.org
Other
28.17k stars 3.97k forks source link

qBittorrent opens from tray icon when clicking unrelated desktop notifications #9084

Closed Talking-Animal closed 1 year ago

Talking-Animal commented 6 years ago

Please provide the following information

qBittorrent version and Operating System

Ubuntu 18.04 LTS qBittorrent v4.1.1 (64-bit)

If on linux, libtorrent and Qt version

libtorrent-rasterbar9 1.1.7 Qt 5.9.5

What is the problem

When qBittorrent is minimized/closed to tray icon, it pops up when clicking on a message notification for telegram-desktop.

What is the expected behavior

qBittorrent remains closed when the notifications for telegram-desktop are clicked.

Steps to reproduce

  1. Have qBittorrent minimized or closed to the taskbar
  2. Receive and click on a notification from telegram-desktop

Extra info(if any)

telegram-desktop Version 1.2.17 Using the Gnome desktop environment with a standard 18.04 LTS install telegram-desktop is set up to use native notifications

UPDATE: I've found that the same issue occurs when clicking notifications for Discord.

leethax666 commented 6 years ago

I get that with ANY notification, qB always pops up.

Xubuntu 18.04 64bit

qB 4.0.3

damiancs commented 6 years ago

I'm having the same problem.

nosuchip commented 6 years ago

Confirm QBittorrent opens on ANY notification, Linux Mint 18.3 XFCE4.

v-fox commented 6 years ago

Started to happen to me in openSUSE Tumbleweed with LXQt after recent update >_< Now I have latest version, 4.1.3.

drgnz commented 6 years ago

I can confirm that Manjaro GNOME has the same problem with qBittorrent 4.1.3

edwardzhxi commented 6 years ago

I get that with ANY notification, qB always pops up.

Xubuntu 18.04 64bit

qB 4.0.3

yeah, I got the same, click every notification, qB shows up...

jgierer12 commented 5 years ago

Same issue here.

System specs Host: XPS 13 9370 OS: Manjaro Linux x86_64 Kernel: Linux 5.0.7-1-MANJARO CPU: Intel i7-8550U (8) @ 4.0GHz GPU: Intel UHD Graphics 620 Memory: 3132MiB / 15756MiB Resolution: 1920x1080 @ 59.96Hz Packages: 1391 (pacman) Shell: fish 3.0.2 Terminal: tilix DE: GNOME 3.32.0 Theme: vimix-doder Icons: Suru++ Font: Inter 13

qBittorrent v4.1.5

A-UNDERSCORE-D commented 5 years ago

Confirming this for Ubuntu 18.04.2 and qbittorrent v4.0.3. It can be quite infuriating when working on and messaging someone on telegram

jgierer12 commented 5 years ago

I have a suspicion that this might be Wayland-related. I've been using Xorg for a short while the other day and stopped encountering the bug. Now I'm back on Wayland and the bug is back too.

Might just be coincidence though. Could some of the others who are experiencing the same issue confirm which display server you are using?

nosuchip commented 5 years ago

@jgierer12 I tested it in Linux Mint 18, it uses X.Org with XFCE4. So, suppose it isn't as Wayland bug.

A-UNDERSCORE-D commented 5 years ago

@jgierer12 in a similar spot to @nosuchip, X11 with a GNOME frontend

sha-265 commented 4 years ago

Confirmed on Ubuntu 20.04

yochananmarqos commented 4 years ago

I hate to leave another "Me too!" post, but this issue has been open for a long time and still occurs.

qBittorrent 4.2.1 GNOME 3.34.3 Manjaro Linux

beelze commented 4 years ago

As for me, chatting and qbittorrent are incompatible because of this bug. The only way is to exit qbittorrent. qb 4.2.1, Gentoo Linux, Mate 1.24

A-UNDERSCORE-D commented 4 years ago

Same here, it makes it incredibly annoying to deal with any chat

volguron commented 4 years ago

Same problem, qbittorrent v4.3.0 Ubuntu 18.04.4 LTS

beelze commented 4 years ago

Just updated to qb 4.2.2, same behaviour. As for me, it isn't just annoying – I have to quit qb everytime I start to chat with anyone instead of keep qb running and seeding torrents.

Nadav-Ruskin commented 4 years ago

does anyone have a workaround?

angiioh commented 4 years ago

Same issue, Linux Mint 20 with qbittorrent 4.2.5

beelze commented 4 years ago

qb 4.2.5 still pops up :-)

beelze commented 4 years ago

does anyone have a workaround?

Only killing qbittorrent. Such a pity.

sha-265 commented 4 years ago

@sledgehammer999 @Chocobo1 @glassez

glassez commented 4 years ago

I'm sorry, but I don't use Linux, so I won't be able to do anything useful other than provide some inferences. qBittorrent can't track clicks on other applications notifications unless Qt/WM/etc. notifies it of events incorrectly. Is anyone able to build and test it with different Qt version?

Darknight3317 commented 4 years ago

Before anyone has found a better workaround I personally use this one:

$ DBUS_SESSION_BUS_ADDRESS=none qbittorrent &>/dev/null &

But keep in mind that in that case you will lose the ability to minimize qBittorrent to the tray and seeing its notifications.

anetogit commented 4 years ago

Same issue, Linux Mint 20 with qbittorrent 4.1.7

yochananmarqos commented 4 years ago

This no longer happens to me on Manjaro Linux, so something Qt related was apparently fixed. Since it's not a qBittorrent issue, I imagine this can be closed.

tp0 commented 4 years ago

This no longer happens to me on Manjaro Linux, so something Qt related was apparently fixed. Since it's not a qBittorrent issue, I imagine this can be closed.

Which Qt version?

yochananmarqos commented 4 years ago

I'm using Qt 5.15.0. I don't remember when the issue resolved itself, I just thought about it since I received a notification about this issue recently.

anetogit commented 4 years ago

I am using this version:

$ apt-cache policy libqt5core5a libqt5core5a: Installed: 5.12.8+dfsg-0ubuntu1 Candidate: 5.12.8+dfsg-0ubuntu1

Need I upgrade to 5.15?

On Fri, Sep 11, 2020 at 12:45 AM Mark Wagie notifications@github.com wrote:

I'm using Qt 5.15.0. I don't remember when the issue resolved itself, I just thought about it since I received a notification about this issue recently.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/qbittorrent/qBittorrent/issues/9084#issuecomment-690856117, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACBB7WCDAH2XOBJQFYCTNZ3SFGMPFANCNFSM4FEJ6SCA .

FranciscoPombal commented 4 years ago

@aneto-core

Need I upgrade to 5.15?

It is very possible that this is caused by a Qt bug (but nobody is 100% sure). It would be appreciated if you could test with Qt 5.15 or 5.15.1 to see if that fixes it.

anetogit commented 4 years ago

The problem is... how to do this upgrade in Linux Mint 20? I found this repository: https://launchpad.net/~beineri/+archive/ubuntu/opt-qt-5.15.0-focal

But I don't know how to do that...

FranciscoPombal commented 4 years ago

@aneto-core

Never used that PPA before, but it's probably just a matter of:

  1. Installing the PPA:
sudo add-apt-repository ppa:beineri/opt-qt-5.15.0-focal
sudo apt-get update
  1. Building qBittorrent, setting the appropriate envrionment to use the files from the PPA:
$ source /opt/qt515/bin/qt515-env.sh # This is what they mean with the "Source /opt/qt515/bin/qt515-env.sh to set the correct environment." comment in the description
$ <qBittorrent build commands, see https://github.com/qbittorrent/qBittorrent/wiki/Compilation:-Debian-and-Ubuntu>
  1. Double-check that the built executable was correctly linked against Qt5
$ ldd /path/to/compiled/qbittorrent
  1. Run qBittorrent
anetogit commented 4 years ago

I am going to try this one: https://unix.stackexchange.com/questions/592471/how-do-i-upgrade-qt-version

Because I don't want to use this PPA... then I will set up it only for my local user.

anetogit commented 4 years ago

It didn't work because qBittorrent was built with Qt 5.12.8.

FranciscoPombal commented 4 years ago

@aneto-core

It didn't work because qBittorrent was built with Qt 5.12.8.

Yes, you have to compile from source against the newly installed Qt version, as suggested in https://github.com/qbittorrent/qBittorrent/issues/9084#issuecomment-691164088. No need to overwrite your existing installation from the package manager, you can simply run the built executable from the build folder once the compilation finishes.

anetogit commented 4 years ago

@FranciscoPombal

I compiled with Qt 5.15.1 and I got the same problem... now I don't know if the problem is Qt. image

isaacvonaaron commented 3 years ago

I can add my +1. Ubuntu 20.04, using qbitorrent PPA, but not the qt ppa as I'm worried about upgrading such a core library. image

guihkx commented 3 years ago

This does not happen on KDE Plasma 5.19, btw. I could reproduce this on GNOME 3.36 and XFCE 4.14, however.

emanuelserpa commented 3 years ago

Can reproduce this on ArchLinux (Sway), I click in Telegram Desktop notifications and qbittorrent opens.

fuxoft commented 3 years ago

I have the same problem on fresh Xubuntu Linux 20.04 installation (XFCE4). Clicking on ANY desktop notification opens qBittorrent and brings it to my current workspace. I am not skilled enough to try recompiling QT because it might solve the problem. Is there a way for me to debug this and help finding the root cause?

Aceler commented 3 years ago

I've got a workaround.

I have Qbittorrent installed from flatpak, and a flatseal. I use flatseal to disable access to org.freedesktop.Notifications.

Снимок экрана от 2021-04-07 12-33-41

The tray icon still in position, I assume the only drawback is that qbittorrent will not respond to it's own notifications like "torrent downloaded".

glassez commented 3 years ago

I wonder if it is related to custom DBus stuff from qtnotify/notifications.*. @qbittorrent/bug-handlers, have you some ideas? Maybe try to use regular QSystemTray::showMessage() on Linux?

FranciscoPombal commented 3 years ago

I wonder if it is related to custom DBus stuff from qtnotify/notifications.*. @qbittorrent/bug-handlers, have you some ideas? Maybe try to use regular QSystemTray::showMessage() on Linux?

I'm all for using more standard, less hacky solutions, if possible :+1:.

FedeAbella commented 3 years ago

I'm getting this as well on Ubuntu 20.04LTS. And it happens when interacting with pretty much any desktop notification.

Also, I tried leaving qBittorrent open on a separate workspace to avoid this. Instead, what happens there is: whenever I get a notification and don't interact with it, I'll immediately get a second "qBittorrent is ready" notification.

Also, regardless of whether I interact with the original notification or not, qBittorrent will somehow jam itself into the Alt-Tab list of apps for whatever workspace I'm in (even if it's not the workspace it is actually open in), driving me crazy whenever I'm working and want to Alt-Tab my way around, since it's always first (as if it were the focused app, even if it clearly isn't). This won't go away until I actually Alt-Tab my way into qBittorrent and get pulled into its workspace, then move away from it.

emanuelserpa commented 3 years ago

Yeah, It's pretty annoying. And only happens with qbittorrent

Senshi00 commented 3 years ago

+1 same issue on Pop!_OS 20.04 LTS x86_64

theNosenOne commented 3 years ago

Been having the same issue on Ubuntu 20.04.3 LTS for a long time

fuomag9 commented 3 years ago

Can replicate this both on ZorinOS 16 and PopOS 21.04

fuomag9 commented 3 years ago

I have a suspicion that this might be Wayland-related. I've been using Xorg for a short while the other day and stopped encountering the bug. Now I'm back on Wayland and the bug is back too.

Might just be coincidence though. Could some of the others who are experiencing the same issue confirm which display server you are using?

I have this issue on X11 (I've never used wayland) so I think it's more code/framework related

Chocobo1 commented 3 years ago

I suspect this is related to the desktop notification handler (don't know the component name...) or even d-bus server. qbt only send notification messages to the dbus and nothing else. It is the handler (or perhaps dbus server) responsibility to invoke/raise the correct application and this is out of jurisdiction of qbt. So please consider file an issue to your desktop environment and the desktop notification handler component, this way we'll have more chance to get the bug found.