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

[REG 6.4.3->6.5.3] Opening a modeless QDialog removes a previously set taskbar icon overlay from native API on Windows 11

    XMLWordPrintable

Details

    • Windows
    • 8f2828683 (dev), 6e2f31187 (6.6), dc3c90402 (6.5)

    Description

      OBS Studio 30.0.0-rc1 uses Qt 6.5.3. OBS Studio 30.0.0-rc1 directly sets the taskbar icon's overlay icon using ITaskbarList3::SetOverlayIcon (via ITaskbarList4). If the user opens a modeless QDialog, an additional window is associated with the taskbar icon, and the taskbar icon overlay previously set gets removed/reset.

      This did not occur in Qt 6.4.3, and it appears to be related to QTBUG-94009 and https://codereview.qt-project.org/c/qt/qtbase/+/428678.

      I've attached a reproducer sample (hacked up from the menus example) that demonstrates the issue in Qt 6.5.3 and Qt 6.7.0 snapshot (6.7.0-0-202310031040). See attached qt-example-menus-taskbariconoverlay.zip.

      Steps To Reproduce in OBS Studio:

      1. Open OBS Studio 30.0.0-rc1 (which uses Qt 6.5.3).
      2. Add a source (a plain Color Source will do).
      3. Click Start Recording.
        Observe that the application icon in the task bar has a red dot overlay.
      4. In the application menu, click Help > Log Files > View Current Log File.
        Observe that the application icon in the task bar no longer has a red dot overlay.

      Steps To Reproduce in the sample:

      1. Build the example with Qt 6.5.3 (newer versions will probably also work).
      2. Run the example.
      3. Click the "Set Taskbar Icon Active" button.
        Observe that the application icon in the task bar has a red dot overlay.
      4. In the application menu, click File > New.
        Observe that the application icon in the task bar no longer has a red dot overlay.

      Optionally, rebuild the sample in Qt 6.4.3, perform the same steps, and observe that the red dot overlay does not disappear.

      As an additional point of interest, if the application has instead used QGuiApplication::setBadgeNumber rather than directly using the native Windows API, this remove/reset does not occur.

      Attachments

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

        Activity

          People

            vestbo Tor Arne Vestbø
            rytoex Ryan Foster
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes