Opened 10 years ago

Closed 9 years ago

#201 closed defect (fixed)

QSystemTrayIcon::setIcon(QIcon) ignored if QIcon is an empty icon

Reported by: Yagiza Owned by:
Priority: minor Milestone: Qt 4.7
Component: xsystray Version: 4.6.3
Severity: low Keywords:
Cc:

Description

When system tray already displays an icon and setIcon(QIcon()) is called to set an empty icon, previously displayed icon still displayed.
On both Windows and Linux in that case no icon (just empty space) is displayed in system tray after the call.

Change History (8)

comment:1 Changed 10 years ago by Yagiza

Component: GeneralQtGui

comment:2 Changed 10 years ago by Silvan Scherrer

Milestone: Qt EnhancedQt 4.7

comment:3 Changed 9 years ago by Silvan Scherrer

Component: QtGuixsystray

comment:4 Changed 9 years ago by Dmitry A. Kuminov

Thank you for the report. Do you mean that the icon is removed in this case or that an empty box equal to the icon size is displayed?

comment:5 Changed 9 years ago by yagiza

In both Windows and Linux empty box equal to the icon size is displayed. In OS/2 nothing happens - just previously displayed icon kept displaying.

comment:6 Changed 9 years ago by Dmitry A. Kuminov

Fixed the original problem in r951.

But now I noticed another one: clicking the icon with the left mouse button produces two click messages. So far, I don't get why. If I enable logging, the problem doesn't show up.

comment:7 Changed 9 years ago by Dmitry A. Kuminov

Some absolute crap. Even if I add a simple DosBeep?(440, 50) (or a DosSleep?(50)) to the *xCenter widget* code (to the place where it posts mouse messages to the Qt client), it starts working as it should. If I remove DosBeep?() (or if I put it to the client code that receives these messages), the problem appears again.

comment:8 Changed 9 years ago by Dmitry A. Kuminov

Resolution: fixed
Status: newclosed

Fixed that nonsense in r952. Was a tiny yet tricky bug, see the commit message.

Note: See TracTickets for help on using tickets.