Skip to content

Commit

Permalink
Fix overlay window sometimes does not show up bug
Browse files Browse the repository at this point in the history
  • Loading branch information
j3soon committed Mar 11, 2022
1 parent 49988f0 commit ae686af
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion speech-to-windows-input/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,15 @@ private static void ToggleSTT()
cancelling = false;
recognizing = true;
if (config.ShowListeningOverlay)
form1.Visible = true;
{
// The window doesn't show up sometimes (don't know how to reproduce) if we only change visibility as below
// form1.Visible = true;

// Try to make sure the window does show up in all scenarios
form1.WindowState = FormWindowState.Normal;
form1.Show();
form1.BringToFront();
}
if (!config.ContinuousRecognition)
{
// Starts speech recognition, and returns after a single utterance is recognized. The end of a
Expand Down

0 comments on commit ae686af

Please sign in to comment.