Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-61898

QSystemTrayIcon does not show if the X11 tray becomes available after show() is called

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.12.4, 5.14.0 Alpha
    • 5.9.1
    • QPA: X11/XCB
    • 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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            paeglis Gatis Paeglis
            mandriver Dmitry Shachnev
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes