gabrielzschmitz / Tomato.C

A pomodoro timer written in pure C.
GNU General Public License v3.0
315 stars 19 forks source link

ALT+NUM = ESC #31

Closed gabrielzschmitz closed 8 months ago

gabrielzschmitz commented 8 months ago

Sorry for the slow response, Time is definitely running when open notepad now, but fixing this seems to generated another problem.

Now when I switch focus from tomato to another application or back to tomato, it seems to receive a q, and quit out. Tested on dwm and Hyprland.

Originally posted by @tienbuigia in https://github.com/gabrielzschmitz/Tomato.C/issues/30#issuecomment-1868222691

gabrielzschmitz commented 8 months ago

Adding this check statement at input.c seems to fix the problem:

      case ESC:
      case CTRLC:
      case 'q':
+        if (getch() != -1) break;
tienbuigia commented 8 months ago

Yes, it is working smoothly now. Thank you.

gabrielzschmitz commented 8 months ago

No problem my man! Any other problem just commit a issue :)