Skip to content

Commit 743a8da

Browse files
committed
fix(Avalonia): move screenshotting to initialization step
This should fix region screenshots on macOS being cut off from the transition from the regular multi tasking desktop to a seperate desktop for a fullscreened application
1 parent a68e114 commit 743a8da

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

SnapX.Avalonia/Views/RegionSelectorWindow.axaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
Closed="OnClosed"
55
Cursor="Hand"
66
Focusable="True"
7+
Initialized="OnInit"
78
KeyDown="OnKeyDown"
89
KeyUp="OnKeyDown"
910
LostFocus="OnLostFocus"
10-
Opened="OnOpened"
1111
PointerMoved="OnPointerMoved"
1212
PointerPressed="OnPointerPressed"
1313
PointerReleased="OnPointerReleased"

SnapX.Avalonia/Views/RegionSelectorWindow.axaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ private void OnKeyDown(object? sender, KeyEventArgs e)
218218
}
219219
private readonly Dictionary<Window, WindowBase?> _ownershipMap = new();
220220

221-
private async void OnOpened(object? Sender, EventArgs EventArgs)
221+
private async void OnInit(object? Sender, EventArgs EventArgs)
222222
{
223223
foreach (var win in App.MyMainWindow?.OwnedWindows.Where(w => w != this && w.IsVisible) ?? [])
224224
{

0 commit comments

Comments
 (0)