Avoid showing tooltips in inactive windows

This commit is contained in:
2025-02-19 21:57:26 +02:00
parent 4d3588d09e
commit 83d6f9fcf3

View File

@@ -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);