forked from AvaloniaUI/Avalonia
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request AvaloniaUI#8880 from AvaloniaUI/fixes/8878-mac-win…
…dow-order macOS: Fix child window order with multiple child windows # Conflicts: # tests/Avalonia.IntegrationTests.Appium/WindowTests_MacOS.cs
- Loading branch information
1 parent
cb56351
commit 92687ad
Showing
5 changed files
with
71 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using System; | ||
using System.Runtime.InteropServices; | ||
using Avalonia.Controls; | ||
|
||
namespace IntegrationTestApp | ||
{ | ||
public static class MacOSIntegration | ||
{ | ||
[DllImport("/usr/lib/libobjc.dylib", EntryPoint = "sel_registerName")] | ||
private static extern IntPtr GetHandle(string name); | ||
|
||
[DllImport("/usr/lib/libobjc.dylib", EntryPoint = "objc_msgSend")] | ||
private static extern long Int64_objc_msgSend(IntPtr receiver, IntPtr selector); | ||
|
||
private static readonly IntPtr s_orderedIndexSelector; | ||
|
||
static MacOSIntegration() | ||
{ | ||
s_orderedIndexSelector = GetHandle("orderedIndex");; | ||
} | ||
|
||
public static long GetOrderedIndex(Window window) | ||
{ | ||
return Int64_objc_msgSend(window.PlatformImpl!.Handle.Handle, s_orderedIndexSelector); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters