Our workaround for QSystemTrayIcon activation misbehavior (clicking the bubble
should NOT send two activation signals!) fails when using StatusNotifier instead,
but only if KDE integration is disabled (wtf?). Turns out we don't get mouse events
from the notifier then.
Solution: only enable workaround when using the legacy tray icon.
virtual ~SystemTray();
virtual void init();
+ inline Mode mode() const;
inline State state() const;
inline bool isAlerted() const;
virtual inline bool isSystemTrayAvailable() const;
protected:
virtual void setMode(Mode mode);
- inline Mode mode() const;
inline bool shouldBeVisible() const;
virtual Icon stateIcon() const;
void SystrayNotificationBackend::notificationActivated(uint notificationId) {
if(!_blockActivation) {
if(_notifications.count()) {
- _blockActivation = true; // prevent double activation because both tray icon and bubble might send a signal
+ if(QtUi::mainWindow()->systemTray()->mode() == SystemTray::Legacy)
+ _blockActivation = true; // prevent double activation because both tray icon and bubble might send a signal
if(!notificationId)
notificationId = _notifications.count()? _notifications.last().notificationId : 0;
emit activated(notificationId);