hovancik / stretchly

The break time reminder app
https://hovancik.net/stretchly
BSD 2-Clause "Simplified" License
4.66k stars 447 forks source link

[Bug]: Sometimes the hotkey for skipping a break does not work #1503

Open sakralbar opened 3 weeks ago

sakralbar commented 3 weeks ago

Version

Known issues

Existing issues

Advanced Preferences

What operating system are you using?

Linux

Operating System Version

ubuntu 24.04.1

Reproduction steps

  1. Install Stretchly via snap
  2. Start a break
  3. Cancel the break by pressing Ctrl + x Reproduces how often: In about 25% of cases.

Expected Behavior

The break is canceled by pressing ctrl+x

Actual Behavior

In about 25% of cases, the break is not canceled.

Relevant log output

No response

Preferences

No response

Additional information

Ubuntu works with wayland, if that's important. The selected keyboard layout does not affect the appearance of the problem.

Code of Conduct

hovancik commented 3 weeks ago

Hi, is the text "Postpone break" visible on break when this happens? Only then the shortcut is active. It might also take a second or two for the shortcut to become active when break starts

sakralbar commented 3 weeks ago

Yes, this text is visible and active. I can postpone the break by clicking on the label.

Now I have found that immediately after the start of the system, delaying the break by ctrl+x does not work in 100% of cases. But if you run Cursor (AI Code Editor, app image), then the break is postponed each time by ctrl+x.

The same thing happens in the case of running VS Code (deb package) or Google chrome. An important clarification is that these programs must be in the form of active windows. If they are minimized to the panel, then delaying breaks by ctrl+x also does not work.

The behavior is the same on both snap and deb versions of Stretchy.

hovancik commented 3 weeks ago

That is weird, will try reproducing when on Linux.

Can you also try setting another shortcut? https://github.com/hovancik/stretchly?tab=readme-ov-file#advanced-preferences and https://github.com/hovancik/stretchly?tab=readme-ov-file#postponefinish-break-shortcut

sakralbar commented 3 weeks ago

I checked the postponement of breaks with the xorg session - it works. The problem only occurs with the wayland session.

When changing "endBreakShortcut" to "Super+X", the problem also persists - this combination only works with the active windows of the applications listed above.

Maybe it's a similar problem with wayland and hotkeys - https://github.com/warpdotdev/Warp/issues/4800

hovancik commented 3 weeks ago

It is the issue with electron: https://github.com/electron/electron/issues/42573