Avalonia
Avalonia copied to clipboard
Maximizing window on a high-DPI monitor causes window buttons to go off the screen
Environment
Observed with both XamlControlsGallery and Synfonia (The former uses 0.10.0-preview5 and the latter appears to use the latest CI build.)
Windows 10 2004
I have four monitors: (I'm including the entire desktop layout for clarity. The relevant monitor is DISPLAY4.)
Monitor | DISPLAY4 | DISPLAY3 | DISPLAY1 | DISPLAY2 |
---|---|---|---|---|
DPI | 200% | 100% | 100% | 100% |
Resolution | 3840x2160 | 1920x1080 | 1920x1080 | 1920x1080 |
Position | -5760, -1080 | -1920, 0 | 0, 0 | 1920, 0 |
DISPLAY1 is set as the primary monitor.
Steps to reproduce
- Launch the Avalonia app
- Maximize the app (either by double-clicking the title bar or clicking the maximize button.)
- Restore the app (again either by double-clicking the title bar or clicking the maximize button.)
Expected behavior
Everything looks normal
Actual behavior
When maximized (after step 2) the window buttons are clipped off the top of the screen:
When restored (after step 3) the window buttons are still slightly jank:
Other information
Maximizing and restoring the "damaged" window on a 100% DPI monitor fixes it:
The window buttons are only messed up after the maximize+restore sequence, they look fine if you just drag the window over: