From e1d5efe4de0692c9be472f1b2e7ee49aab3ab5a2 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Mon, 9 Sep 2024 10:29:32 -0400 Subject: [PATCH] Fix for tooltip focus stealing --- IDE/src/util/ConsoleProvider.bf | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/IDE/src/util/ConsoleProvider.bf b/IDE/src/util/ConsoleProvider.bf index fce827ca..1ea84aed 100644 --- a/IDE/src/util/ConsoleProvider.bf +++ b/IDE/src/util/ConsoleProvider.bf @@ -571,12 +571,16 @@ class WinNativeConsoleProvider : ConsoleProvider if (processId > 0) AttachConsole(processId); else*/ - AllocConsole(); + + AllocConsole(); var window = GetConsoleWindow(); - if (mHideNativeConsole) + if ((mHideNativeConsole) && (window != default)) + { Windows.SetWindowPos(window, default, 0, 0, 0, 0, 0x290 /* SWP_NOACTIVATE | SWP_NOREPOSITION | SWP_HIDEWINDOW */); + gApp.mMainWindow.SetForeground(); + } //ResizeComponents(); #endif @@ -596,6 +600,8 @@ class WinNativeConsoleProvider : ConsoleProvider FreeConsole(); #endif + //gApp.mMainWindow.SetForeground(); + mCmdSpawn?.Kill(); DeleteAndNullify!(mCmdSpawn); mExecSpawn?.Kill();