Browse Source
Merge branch 'master' into cleanup-keygesture
pull/2990/head
Dariusz Komosiński
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
6 additions and
0 deletions
-
src/Avalonia.Controls/Primitives/PopupPositioning/ManagedPopupPositioner.cs
|
|
|
@ -100,6 +100,12 @@ namespace Avalonia.Controls.Primitives.PopupPositioning |
|
|
|
?? screens.FirstOrDefault(s => s.Bounds.Contains(parentGeometry.TopLeft)) |
|
|
|
?? screens.FirstOrDefault(s => s.Bounds.Intersects(parentGeometry)) |
|
|
|
?? screens.FirstOrDefault(); |
|
|
|
|
|
|
|
if (targetScreen != null && targetScreen.WorkingArea.IsEmpty) |
|
|
|
{ |
|
|
|
return targetScreen.Bounds; |
|
|
|
} |
|
|
|
|
|
|
|
return targetScreen?.WorkingArea |
|
|
|
?? new Rect(0, 0, double.MaxValue, double.MaxValue); |
|
|
|
} |
|
|
|
|