Avalonia
Avalonia copied to clipboard
Window positioned on wrong(?) monitor
Describe the bug In Avalonia 0.10.18, an Avalonia window would position itself on the monitor currently being interacted with when first opened. For whatever reason, after migrating to 11.0.0-preview2, they always appear on, at least in my case, my leftmost monitor...which isn't even my primary monitor.
To Reproduce Steps to reproduce the behavior:
-
dotnet new avalonia.app
- Change version of all Avalonia
PackageReference
s to11.0.0-preview2
- Add another
PackageReference
forAvalonia.Themes.Fluent
(again, version11.0.0-preview2
) -
dotnet run
Expected behavior Avalonia windows appear on the monitor currently being interacted with, instead of inexplicably ~~trying to use my reflexes to snap my neck~~ appearing all the way to the top-left of the leftmost monitor.
Desktop:
- OS: Linux (Kubuntu 20.04, x64)
- Version 11.0.0-preview2
Additional context I'm guessing nobody else here is dumb enough to put their primary monitor/laptop on the right, besides myself? I've seen other apps suffer similar mental breakdowns whilst trying to comprehend this monitor arrangement, but an entire GUI framework? That could hit every app that uses Avalonia...
Strange, I have my primary monitor on the right, and I'm not seeing this.
EDIT: Ah sorry, linux, sorry I didn't notice. I'm running Windows.
On macOS and windows app is correctly finding out that my primary monitor is the right one. ~Causing some pain, because I opened it from the Rider on the left.~ I guess some linux distros might have a better opinion, where to open the window. Or it's a bug in linux backend in avalonia.
~Causing some pain, because I opened it from the Rider on the left.~
@maxkatz6
My neck can relate...albeit in the opposite horizontal direction.
I guess some linux distros might have a better opinion, where to open the window. Or it's a bug in linux backend in avalonia.
I would consider the former a plausible (though unfortunate) explanation, but...considering this is new to the Avalonia 11 previews and doesn't happen with 0.10.x, I can't help but feel like the latter is more plausible...
On macOS and windows app is correctly finding out that my primary monitor is the right one.
Ironically, in spite of being a Linux main, I'd probably be better equipped to try to help fix this if it had happened on Windows...but it didn't.
That said...if there's anything I can do to help diagnose/investigate/fix the issue, please, do tell.