Skip to content

Commit

Permalink
fix: make reward alert draw over other apps
Browse files Browse the repository at this point in the history
Fixes #4.
  • Loading branch information
Shaedil committed Mar 29, 2022
1 parent 8f73295 commit df24458
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pomodoro.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
Options:
-h, --help Show this help message and exit
--version Show version and exit
"""

import os
Expand Down Expand Up @@ -113,7 +112,6 @@ def check_reward(reward_prob: float) -> bool:
"""
returns true if rng < reward_prob
"""

rng = random.random()
if rng < reward_prob:
return True
Expand Down Expand Up @@ -195,6 +193,7 @@ def reward_alert() -> None:
popup if reward
"""
root = tk.Tk()
root.attributes('-topmost')
root.withdraw()
messagebox.showwarning(
'You got a Reward!',
Expand Down

0 comments on commit df24458

Please sign in to comment.