Skip to content

Commit

Permalink
Merge pull request #266 from dictation-toolbox/fix-win32-window-bug
Browse files Browse the repository at this point in the history
Fix bug causing Win32Window.set_foreground() to fail sometimes
  • Loading branch information
drmfinlay authored Jul 10, 2020
2 parents 28aafcc + f8ff402 commit b288491
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dragonfly/windows/win32_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def set_foreground(self):
# SetForegroundWindow() for why this works.
# Only do this if neither the left or right control keys are
# held down.
if win32api.GetKeyState(win32con.VK_CONTROL) == 0:
if win32api.GetKeyState(win32con.VK_CONTROL) >= 0:
Key("control:down,control:up").execute()

# Set the foreground window.
Expand Down

0 comments on commit b288491

Please sign in to comment.