stretchly icon indicating copy to clipboard operation
stretchly copied to clipboard

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

Open sakralbar opened this issue 1 year ago • 5 comments

Version

  • [X] I'm using version 1.16

Known issues

  • [X] I've checked Known issues

Existing issues

  • [X] I've checked Existing issues

Advanced Preferences

  • [X] I've checked 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

  • [X] I agree to follow this project's Code of Conduct

sakralbar avatar Oct 31 '24 08:10 sakralbar

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

hovancik avatar Oct 31 '24 13:10 hovancik

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.

sakralbar avatar Oct 31 '24 16:10 sakralbar

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

hovancik avatar Nov 01 '24 13:11 hovancik

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

sakralbar avatar Nov 02 '24 08:11 sakralbar

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

hovancik avatar Nov 02 '24 09:11 hovancik

Had the same issue on Gnome 48 Wayland, both for break skip or pauseBreaksToggleShortcut.

I solved the pauseBreaksToggleShortcut shortcut not working by creating a custom gnome shortcut to stretchly toggle command, works like a charm.

But for break skip, we don't have any CLI command, right ?

Thanks !

RobinFrcd avatar Aug 24 '25 20:08 RobinFrcd

@RobinFrcd yeah, no CLI for break skip/postpone, but I guess it could be added

hovancik avatar Sep 02 '25 12:09 hovancik