Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The blurred background of a window extends outside the window when it is maximized #4753

Closed
PathogenDavid opened this issue Sep 27, 2020 · 3 comments

Comments

@PathogenDavid
Copy link
Contributor

PathogenDavid commented Sep 27, 2020

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 multiple monitors. (I don't believe it's relevant in this one, but my exact layout is described in #4752)

Steps to reproduce

  1. Maximize the Avalonia window on one monitor
  2. Look cloosely at the shared edge of the neighboring monitor

Expected behavior

Everything looks normal

Actual behavior

There's a thin strip of bluryness on the neighboring monitor:

image

This screenshot is showing the border between two monitors. To remove any change of ambiguity, here's a meatspace photo:

image

@amwx
Copy link
Contributor

amwx commented Sep 28, 2020

This is actually an issue with Windows itself. When desiring a blurred window, DWM blurs everything including the dropshadow behind the window (you can see the same blurred outline around the window if you don't maximize it and place the edge of the window over something white, for example). When you maximize a window, Windows makes the window larger than the screen and then clips it down so you don't see the border & shadow, but for some reason the clipping doesn't occur properly when the window is blurred. I don't think there's an actual fix for it unless you want to get real hacky in the WndProc as the window maximizes/restores.

@PathogenDavid
Copy link
Contributor Author

While I do agree Windows probably isn't making things easy on Avalonia here. I've observed this issue with other apps which draw their own window decorations and have noticed fix the issue after an update. (Unfortunately nothing open source comes to mind, although I do feel it was common on Node apps.)

@maxkatz6
Copy link
Member

Yes, it is common for windowing with old Win32 API.
This also should be fixed after #4346 will be merged, because it use WinUI.Composition for acrylic background, that doesn't have this issue.

@maxkatz6 maxkatz6 closed this as completed Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants