Skip to content

Slider value erratically changing on mouse drag when multiple windows are open #10572

@BernhardMarconato

Description

@BernhardMarconato

Describe the bug

When opening multiple windows in a WinUI 3 app and then dragging a thumb of a slider, the value is erratically changing between random values. It is no longer possible to reliably set a value when dragging.

See the attached recording.

  • At least one of the windows seems to need to have set ExtendsContentIntoTitleBar = true for this to occur.
  • The more windows are opened, the easier it is to reproduce.
  • When attaching PointerEntered/PointerExited events on the slider, you can see the mouse seems to be constantly entering and exiting the slider even though the mouse visibly stays on the slider.
  • This does not only affect sliders, but any controls. For example, when hovering over a button, you can see it getting and losing hover effects constantly, even though the mouse is not physically moving.
  • When selecting a window from another process, and then selecting the window in the WinUI 3 app again, the problem disappears completely.
  • This is also reproducible in the WinUI 3 Gallery app.

Reproducible in 1.7.2 and also 1.8-experimental-2.

Steps to reproduce the bug

Use repro app: https://github.com/BernhardMarconato/WinUIMultipleWindowSliderBug
It contains a window with ExtendsContentIntoTitleBar = true, a slider, and a button to open another window of the same class.

  1. Start the repro app
  2. Open at least one more window (the more, the easier to reproduce)
  3. Click on the initial window
  4. Drag the slider around without releasing it

Expected behavior

The slider value is changed to the expected value instead of changing erratically.

Screenshots

winui-3-multiple-windows-bug.mp4

NuGet package version

WinUI 3 - Windows App SDK 1.7.2: 1.7.250513003

Windows version

Windows 11 (24H2): Build 26100

Additional context

No response

Metadata

Metadata

Assignees

Labels

area-SliderbugSomething isn't workingfix-releasedThe fix has been in a release (experimental, preview, stable, or servicing).

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions