whatsie icon indicating copy to clipboard operation
whatsie copied to clipboard

Opens when click on any notification

Open saintsloth opened this issue 2 years ago • 8 comments

Hello! When I click on the notification (pop-up) of any program, whatsie opens Tried 4.2 (stable) and 4.2.1 (edge) from snap I don't know if it matters, but, i use Linux mint, cinnamon If you need more information, [email protected]

Great app, thanks!

saintsloth avatar May 29 '22 18:05 saintsloth

Linux Mint 20.3 Una Cinnamon 5.2.7 Kernel: 5.4.0-113-generic x86_64

saintsloth avatar May 29 '22 18:05 saintsloth

I noticed the same behavior, it is pretty annoying. My system in case it matters: Arch, Kernel: 6.1.6-arch1-1 Sway 1.8 with waybar (for system tray) and mako (for notifications)

JulianFP avatar Jan 18 '23 10:01 JulianFP

Out of curiosity I looked into this bug a bit. This is what I found out:

  • Disabling Notification Popups in Settings doesn't solve this
  • This seems to happen only if the nofitication has some kind of action defined, e.g. "Activate" (a custom notification created with "notify-send" without actions doesn't do the trick, but a mail-notification from thunderbird or a new-message notification from signal does)
  • In mainwindow.cpp: Uncommenting "this->show()" in line 1064 (in MainWindow::messageClicked()) and in line 543 (in MainWindow::notify()) prevents this behavior.
  • Debugging mainwindow.cpp with breakpoints at line 543 and 1064 confirms this: Everytime I click on a notification of another application (like Thunderbird, Signal, ...), both MainWindow::messageClicked() and MainWindow::notify() get called, resulting in those two lines being executed.

Unfortunately I don't know much about qt, so I couldn't figure out what calls these functions and why.

JulianFP avatar Jan 28 '23 11:01 JulianFP

I will check. Thanks

keshavbhatt avatar Jan 29 '23 07:01 keshavbhatt

It's a bug in Qt: https://bugreports.qt.io/browse/QTBUG-112170

I don't think it's possible to work around, other than implementing the system tray without QSystemTrayIcon. messageClicked() is just too broken.

Vogtinator avatar Mar 21 '23 10:03 Vogtinator

I was trying to reproduce this behavior, and this what i found:

  • the issue only get triggred when app is running as snap
  • executing same code do not trigger the issue when built & run locally

Command to trigger the issue (notify-send clickable notification): notify-send "Clickable Message" "This message can be clicked!" --icon=dialog-information --action="default,Open Terminal"

keshavbhatt avatar Mar 22 '23 07:03 keshavbhatt

I was trying to reproduce this behavior, and this what i found:

  • the issue only get triggred when app is running as snap
  • executing same code do not trigger the issue when built & run locally

Probably because you're using Plasma? Plasma ships its own QSystemTrayIcon implementation which does not have that bug. Inside the Snap and Flatpak, this is not available and the broken Qt one is used.

Command to trigger the issue (notify-send clickable notification): notify-send "Clickable Message" "This message can be clicked!" --icon=dialog-information --action="default,Open Terminal"

Vogtinator avatar Mar 22 '23 07:03 Vogtinator

Probably because you're using Plasma?

Yes. Thanks for insight :)

keshavbhatt avatar Mar 22 '23 07:03 keshavbhatt