Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/xwt.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSandy Armstrong <sandy@xamarin.com>2022-04-27 01:42:09 +0300
committerSandy Armstrong <sandy@xamarin.com>2022-04-27 01:42:09 +0300
commit4abf47402cc61527fb7a2a8b2dd64338805ae625 (patch)
treeb9719fe5c18d211b8bad7652d1e6fadb975cbf60
parente9aee053d0bab21b00fe0c85fc1a0c4f03d32542 (diff)
Mac: Make dialog window key when showingdev/sandy/keydialogs
Fixes scenarios where a dialog is shown but a background window continues receiving input.
-rw-r--r--Xwt.XamMac/Xwt.Mac/DialogBackend.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Xwt.XamMac/Xwt.Mac/DialogBackend.cs b/Xwt.XamMac/Xwt.Mac/DialogBackend.cs
index effc9372..f98d52c1 100644
--- a/Xwt.XamMac/Xwt.Mac/DialogBackend.cs
+++ b/Xwt.XamMac/Xwt.Mac/DialogBackend.cs
@@ -174,6 +174,10 @@ namespace Xwt.Mac
nsParent = NSApplication.SharedApplication.ModalWindow ?? NSApplication.SharedApplication.KeyWindow;
}
+ // Next, make this window key before adding it as a child.
+ // This matches behavior in MonoDevelop.Ide.MessageService.RunCustomDialog.
+ MakeKeyAndOrderFront(NSApplication.SharedApplication);
+
if (nsParent != null && nsParent.IsVisible)
{
nsParent.AddChildWindow(this, NSWindowOrderingMode.Above);