Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.9.1
-
None
-
Debian GNU/Linux sid amd64
-
2947435d8737f9b97a80532864ec2302f6719355 (qt/qtbase/5.12)
Description
Test case:
- Run gnome-panel (any other panel with X11 systray implementation should work too);
- Remove the “Notification Area” applet from the panel;
- Start the attached program;
- Add the “Notification Area” applet back.
The documentation for QSystemTrayIcon says:
If the system tray is unavailable when a system tray icon is constructed, but becomes available later, QSystemTrayIcon will automatically add an entry for the application in the system tray if the icon is visible.
But that does not actually happen. It looks like QSystemTrayIconPrivate::install_sys() in qsystemtrayicon_x11.cpp does nothing if locateSystemTray() returns false.
If the tray is removed after the tray icon is shown, and then added back again, the icon restores correctly.