From fd4b9a5a9f18cdfa5c52aea56dd819431fb4be36 Mon Sep 17 00:00:00 2001 From: Chandler Cox Date: Fri, 16 Dec 2022 16:29:43 -0600 Subject: [PATCH] Return focus to parent on mouse leave. --- Source/Editor/Windows/GameWindow.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Source/Editor/Windows/GameWindow.cs b/Source/Editor/Windows/GameWindow.cs index 23558c396..89598265c 100644 --- a/Source/Editor/Windows/GameWindow.cs +++ b/Source/Editor/Windows/GameWindow.cs @@ -345,6 +345,13 @@ namespace FlaxEditor.Windows Cursor = CursorType.Default; } + /// + public override void OnMouseLeave() + { + Parent?.Focus(); + base.OnMouseLeave(); + } + /// public override void OnShowContextMenu(ContextMenu menu) {