Skip to content

Commit

Permalink
Minor
Browse files Browse the repository at this point in the history
  • Loading branch information
rampaa committed Oct 1, 2023
1 parent d564f47 commit 083a5de
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion JL.Windows/GUI/PopupWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@ public async Task LookupOnCharPosition(TextBox tb, int charPosition, bool enable
UpdatePosition(PointToScreen(Mouse.GetPosition(this)));
}

if (ConfigManager.Focusable && ConfigManager.PopupFocusOnLookup)
if (ConfigManager.Focusable
&& (enableMiningMode || ConfigManager.PopupFocusOnLookup))
{
_ = Activate();
}
Expand Down Expand Up @@ -1848,6 +1849,13 @@ public static void ShowMiningModeResults(PopupWindow popupWindow)
WinApi.BringToFront(popupWindow.WindowHandle);
popupWindow.DisplayResults(true);

if (ConfigManager.Focusable)
{
_ = popupWindow.Activate();
}

_ = popupWindow.Focus();

if (ConfigManager.AutoHidePopupIfMouseIsNotOverIt)
{
PopupWindowUtils.SetPopupAutoHideTimer();
Expand Down

0 comments on commit 083a5de

Please sign in to comment.