enhance: do not show tooltip if the ower window is deactived (#1218)

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2025-04-22 10:22:02 +08:00
parent 9c53894cb4
commit 6882ae069f
No known key found for this signature in database

View file

@ -368,6 +368,14 @@ namespace SourceGit
{
BindingPlugins.DataValidators.RemoveAt(0);
// Disable tooltip if window is not active.
ToolTip.ToolTipOpeningEvent.AddClassHandler<Control>((c, e) =>
{
var topLevel = TopLevel.GetTopLevel(c);
if (topLevel is not Window { IsActive: true })
e.Cancel = true;
});
if (TryLaunchAsCoreEditor(desktop))
return;