microsoft / WindowsAppSDK

The Windows App SDK empowers all Windows desktop apps with modern Windows UI, APIs, and platform features, including back-compat support, shipped via NuGet.
https://docs.microsoft.com/windows/apps/windows-app-sdk/
MIT License
3.85k stars 323 forks source link

Critical UI Bug: Qt Application Window Fails to Render Correctly on Monitors with Scaling #4652

Closed Alicedrop closed 2 months ago

Alicedrop commented 3 months ago

Describe the bug

I have developed a window using Qt (PySide6), and I encountered a problem when dragging the window between two monitors. The issue specifically occurs when the secondary monitor is set to 150% or other options except 100% scaling.

When I drag the window from one monitor to another, sometimes the window display becomes distorted, and only about a quarter of the content is visible. Despite the visual distortion, the window still responds to clicks and other interactions as if the full content were displayed normally. The window returns to normal only after I interact with another application window, such as clicking on it.

I also report this bug on Microsoft Commumity. https://answers.microsoft.com/en-us/windows/forum/windows_11-wintop_display/critical-ui-bug-qt-application-window-fails-to/cbda0b25-91cd-43f3-9cf4-305555d9a8b6?messageId=28167823-e72f-4bfd-a756-d34408c77e32

Steps to reproduce the bug

  1. Create an Qt Main window with pyside6 at Qt.FramelessWindowHint and Qt.WA_TranslucentBackground
    self.setWindowFlags(Qt.FramelessWindowHint)
    self.setAttribute(Qt.WA_TranslucentBackground)
  2. Make sure there is at least 2 screens connected to the computer, Set the secondary screen at 125% scaling or higher.
  3. Drag the window among these screens.
  4. Then you can see the window is sliced. image

image

Expected behavior

No response

Screenshots

image image

NuGet package version

None

Packaging type

Unpackaged

Windows version

Windows 11 version 22H2 (22621, 2022 Update)

IDE

Other

Additional context

No response

codendone commented 2 months ago

It sounds like this is not using Windows App SDK. Closing as external.