From f96a5623e4365e7ccfd3cfe865063c1b25ed7937 Mon Sep 17 00:00:00 2001 From: Ari Vuollet Date: Wed, 19 Feb 2025 21:57:26 +0200 Subject: [PATCH] Avoid showing tooltips in inactive windows --- Source/Engine/UI/GUI/Tooltip.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Source/Engine/UI/GUI/Tooltip.cs b/Source/Engine/UI/GUI/Tooltip.cs index 314211225..bc1b968b2 100644 --- a/Source/Engine/UI/GUI/Tooltip.cs +++ b/Source/Engine/UI/GUI/Tooltip.cs @@ -74,10 +74,15 @@ namespace FlaxEngine.GUI UnlockChildrenRecursive(); PerformLayout(); - // Calculate popup direction and initial location var parentWin = target.Root; if (parentWin == null) return; + + // Showing a popup window might bring up the parent window on top + if (!parentWin.IsFocused) + return; + + // Calculate popup direction and initial location var dpiScale = target.RootWindow.DpiScale; var dpiSize = Size * dpiScale; var locationWS = target.PointToWindow(location);