Bug 364798 - Double-click on systray app icon should show the app's main window
Summary: Double-click on systray app icon should show the app's main window
Status: CONFIRMED
Alias: None
Product: plasmashell
Classification: Plasma
Component: System Tray widget (show other bugs)
Version: 5.22.4
Platform: openSUSE Linux
: NOR wishlist
Target Milestone: 1.0
Assignee: Martin Klapetek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-27 08:37 UTC by Jiri Slaby
Modified: 2023-04-10 03:29 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
icewm click backtrace (4.36 KB, text/plain)
2016-06-27 08:40 UTC, Jiri Slaby
Details
KDE5+qt4 click backtrace (5.61 KB, text/plain)
2016-06-27 08:42 UTC, Jiri Slaby
Details
KDE5+qt5 click backtrace (7.49 KB, text/plain)
2016-06-27 08:43 UTC, Jiri Slaby
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Slaby 2016-06-27 08:37:59 UTC
When I double click an icon in systemtray, it does nothing, but it should open the main window of the relevant application. This works without knotifications correctly, e.g. in icewm.

I noticed this problem on KDE 5 with psi+:
https://github.com/psi-plus/psi-plus-snapshots

FWIW middle and right clicks and scroll events are not passed down to the app correctly too. 

For testing purposes, I wrote a minimalistic simple app creating only a QSystemTrayIcon:
https://github.com/jirislaby/collected_sources/tree/master/qt5-icon

When I click on the icon in icewm (i.e. no knotifications), I get:
left button: activate 3
middle button: activate 4
right button: activate 1
double click: activate 3 & activate 2
scroll: wasn't tried

In KDE 5, the app built against qt5 (libQt5Core.so.5 => /usr/lib64/libQt5Core.so.5):
left button: activate 3
middle button: activate 1 (WRONG)
right button: NOTHING (WRONG)
double click: activate 3 & activate 3 (WRONG)
scroll: NOTHING (WRONG)

In KDE 5, the app built against qt4 (libQtCore.so.4 => /usr/lib64/libQtCore.so.4):
left button: activate 3
middle button: activate 4
right button: NOTHING (WRONG)
double click: activate 3 & activate 3 (WRONG)
scroll: eventFilter true 31

Reproducible: Always
Comment 1 Jiri Slaby 2016-06-27 08:40:11 UTC
Created attachment 99714 [details]
icewm click backtrace
Comment 2 Jiri Slaby 2016-06-27 08:42:26 UTC
Created attachment 99715 [details]
KDE5+qt4 click backtrace
Comment 3 Jiri Slaby 2016-06-27 08:43:37 UTC
Created attachment 99716 [details]
KDE5+qt5 click backtrace
Comment 4 Jiri Slaby 2016-06-27 08:49:57 UTC
Versions:
qt4: libqt4-4.8.7-4.1.x86_64
qt5: libQt5Core5-5.6.0-1.1.x86_64
KDE5: plasma-framework-5.22.0-1.1.x86_64
knotifications: libKF5Notifications5-5.22.0-1.2.x86_64
Comment 5 Jiri Slaby 2016-06-27 08:51:53 UTC
And yet, what should the activate numbers actually be:
QPlatformSystemTrayIcon::Context	        1
QPlatformSystemTrayIcon::DoubleClick	2
QPlatformSystemTrayIcon::Trigger	        3
QPlatformSystemTrayIcon::MiddleClick	4

according to:
http://doc.qt.io/qt-5/qplatformsystemtrayicon.html#ActivationReason-enum
Comment 6 Jiri Slaby 2016-06-27 09:39:34 UTC
And indeed, removing /usr/lib64/libKF5Notifications.so.5* makes the problem disappear.
Comment 7 Aleix Pol 2017-02-09 17:25:53 UTC
So it was a binary compatibility issue?
Comment 8 Jiri Slaby 2017-02-10 08:55:18 UTC
(In reply to Aleix Pol from comment #7)
> So it was a binary compatibility issue?

Not at all -- it only means that libKF5Notifications5 is the culprit.

Now, even when the KDE/plasma stack in opensuse completely runs on the top of qt5, the problem still persists.