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

DBus system tray menu is not updated when it is changed after show()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • P2: Important
    • None
    • 5.13.1
    • D-Bus, QPA: X11/XCB
    • None
    • Linux KDE without plasma-integration:
      unset KDE_FULL_SESSION
      unset XDG_CURRENT_DESKTOP
    • Linux/X11

    Description

      Situation happens when:

      • system tray is created and shown
      • new system tray menu is fully created (no further changes) and set as a new system tray menu.

      In Qt >= 5.11 only "NewMenu" signal is sent, introduced in commit ff169e8859457188f94aed86368876ba5bab2e90. As you admit, it is not part of the standard.

      Additional LayoutUpdated should be sent, for example in:

      void QDBusTrayIcon::updateMenu(QPlatformMenu * menu)
      // ...
      m_menu->setRevision(oldMenu->revision());
      m_menu->emitUpdated();

      Unfortunately there is no API to get/set revision, it needs to be added in QDBusPlatformMenu. Without that, revision will start from 1 again and most probably LayoutUpdated will be ignored.

      Example app affected by this problem:
      https://bugs.kde.org/attachment.cgi?id=107107

      This issue is also reported in KDE bug tracker:
      https://bugs.kde.org/show_bug.cgi?id=383202

      Attachments

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

        Activity

          People

            paeglis Gatis Paeglis
            kmaterka Konrad Materka
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes