AvaloniaUI / Avalonia

Develop Desktop, Embedded, Mobile and WebAssembly apps with C# and XAML. The most popular .NET UI client technology
https://avaloniaui.net
MIT License
25.16k stars 2.18k forks source link

Clicking the title bar with the mouse causes frame drops and freezes #16304

Open chinware opened 1 month ago

chinware commented 1 month ago

Describe the bug

When the mouse clicks on the window title bar, the page will be stuck for about 100 milliseconds, and the page animation will drop frames at this time. If you right-click, the animation will be stuck from the time the button is pressed to the time it is released. 微信截图_20240713135118

To Reproduce

Click the title bar and look carefully at the mouse pointer. It will flash. At this time, if the page has animation, the frame rate will also be dropped.

Expected behavior

When you press the mouse, there should be no frame drops.

Avalonia version

11.1.0,11.1.0-rc2

OS

Windows

Additional context

No response

maxkatz6 commented 1 month ago

It is expected for apps that don't use WinUIComposition/DirectComposition rendering. Have you changed any Win32 platform options from defaults?

chinware commented 1 month ago

I should have used the default configuration. I asked several friends in the community and they all had this problem. It doesn't matter if it's a custom titlebar or the system's built-in one. As long as you click in the titlebar area, there will be problems. 微信截图_20240713194050

chinware commented 1 month ago

微信截图_20240713195513