Skip to content

Commit

Permalink
Bring window to front and activate when empty or invalid timer input
Browse files Browse the repository at this point in the history
  • Loading branch information
i2van committed Nov 17, 2024
1 parent 28ae10b commit f4fd0ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Hourglass/AppEntry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ private static void ShowNewTimerWindow(CommandLineArguments arguments, TimerStar
window.Restore(arguments.GetWindowSize(), RestoreOptions.AllowMinimized);
window.Show();

if (window.WindowState != WindowState.Minimized)
if (timerStart is null || window.WindowState != WindowState.Minimized)
{
window.BringToFrontAndActivate();
}
Expand Down
2 changes: 1 addition & 1 deletion Hourglass/Windows/TimerWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ public void Show(TimerStart timerStart, bool remember = true)
else
{
// Otherwise, assume the user made an error and display a validation error animation
Show();
BringToFrontAndActivate();
SwitchToInputMode();
BeginValidationErrorAnimation();
}
Expand Down

0 comments on commit f4fd0ca

Please sign in to comment.