microsoft-ui-xaml icon indicating copy to clipboard operation
microsoft-ui-xaml copied to clipboard

ExtendsContentIntoTitleBar = true causes incorrect cursor events in child windows (WinAppSdk 1.6+)

Open ramjke opened this issue 9 months ago • 5 comments

Describe the bug

This bug drives me mad. It started with WinAppSDK 1.6.

When ExtendsContentIntoTitleBar = true; is set in the main window, and main window is minimized, child windows start incorrectly processing cursor events.

The bug is likely tied to how WinUI 3 manages input events when ExtendsContentIntoTitleBar is enabled. Which leads to a wide variety of bugs, such as controls flickering on hover.

Reproducible on: Windows App SDK 1.6.x Not reproducible on: Windows App SDK 1.5.x

Steps to reproduce the bug

  1. Enable ExtendsContentIntoTitleBar = true in the Main Window to use a modern title bar.
  2. Create a Second Window.
  3. Minimize the Main Window.
  4. Hover over any controls in the Second Window.
  5. Observe flickering and incorrect pointer events.

Repo to reproduce: https://github.com/ramjke/SecondWindowFlickeringTest

Expected behavior

PointerEntered should trigger only once when the cursor enters a control.

Screenshots

https://github.com/user-attachments/assets/c7e1eb53-94b9-4491-818e-b033b3c86041

NuGet package version

WinUI 3 - Windows App SDK 1.6.5: 1.6.250205002

Windows version

Windows 11 (23H2): Build 22631

Additional context

No response

ramjke avatar Feb 15 '25 10:02 ramjke

There are lots of related issues reported. The issue is around for quite some time. Can it please be fixed? Our customers keep reporting this issue. Going back to SDK 1.5 is not an option, due to other issues.

wbokkers avatar May 23 '25 18:05 wbokkers

Issues https://github.com/microsoft/microsoft-ui-xaml/issues/10357 / https://github.com/microsoft/microsoft-ui-xaml/issues/10067 / https://github.com/microsoft/microsoft-ui-xaml/issues/10529 and https://github.com/microsoft/microsoft-ui-xaml/issues/10572 seem to be related.

wbokkers avatar May 23 '25 18:05 wbokkers

I ended up using the old-style, ugly title bar with ExtendsContentIntoTitleBar = false as a temporary solution.

ramjke avatar May 24 '25 04:05 ramjke

Still not fixed in 1.7.3 Please fix asap. It is the top issue our (many!) customers see in WindowsAppSDK. @codendone When will this be fixed? How can I reach out to Microsoft other than complaining here?

wbokkers avatar Jun 12 '25 10:06 wbokkers

@wbokkers I pinged the area owner, who has been busy with multiple hot issues. Some investigation has happened, and the thinking is the set of issues you listed above are likely all the same bug.

codendone avatar Jun 12 '25 18:06 codendone

@niels9001 This issue is then probably also fixed in Windows App SDK 1.8 (Issues https://github.com/microsoft/microsoft-ui-xaml/issues/10357 / https://github.com/microsoft/microsoft-ui-xaml/issues/10067 / https://github.com/microsoft/microsoft-ui-xaml/issues/10529 and https://github.com/microsoft/microsoft-ui-xaml/issues/10572 seem to be related as was mentioned above.)

BernhardMarconato avatar Sep 10 '25 12:09 BernhardMarconato

@BernhardMarconato Yep, I just tested this by upgrading the repro to 1.8 and I can no longer repro the issue!

niels9001 avatar Sep 10 '25 13:09 niels9001

@niels9001 Bedankt Niels! Finally we can use ExtendsContentIntoTitleBar in our app.

wbokkers avatar Sep 10 '25 13:09 wbokkers