SafeEyes icon indicating copy to clipboard operation
SafeEyes copied to clipboard

Pressing Space or Enter on break screen should not lock screen

Open maximbaz opened this issue 3 years ago • 2 comments

Hey, thanks for the app!

I am experiencing a weird issue: sometimes (not every time!) when I click on Postpone or Skip a break, the screen gets locked. Interestingly, this happens even on short breaks! I think I also saw once where a screen would be locked after a short break has ended, although I'm not super sure.

I don't have a precise steps to reproduce, unfortunately. I looked at the code and I couldn't spot any obvious issue. Perhaps you would have some ideas? Any directions for debugging the issue?

I've not been able to reproduce this issue if I manually start a break using safeeyes -t, so I'm wondering if this bug is caused by some bad state left from the previous break...?

Here is my config: safeeyes.json

I'm on Arch, using sway (wayland), safeeyes v2.1.1

maximbaz avatar Jan 12 '21 18:01 maximbaz

I think I discovered the cause of this, it's a silly one 🤦‍♂️ - I am typing something and when lock screen suddenly shows up, my hands are still typing and they press Space or Enter and this keypress activates the "lock" button - try yourself, with screensaver plugin enabled, run safeeyes -t, and then press Enter or Space and it will press the lock button.

Can we make sure that these keypresses don't press lock button? Maybe lock button is somehow selected by default, and the solution is to not have any focus on any button? If user wants to press lock button, they can first press Tab one or several times to find the button, and only then Space or Enter.

maximbaz avatar Jan 27 '21 16:01 maximbaz

Hello @maximbaz ! I have similar issue, but I'm not sure if your steps to reproduce are valid for me, going to check. The system gets locked as well, and in my case even with breaking some processes like firefox and aplay and actually gnome-screansaver. By broken I mean that now they are defunct

alex      4169  0.0  0.0      0     0 ?        Z    12:30   0:00 [firefox-bin] <defunct>
alex      8920  0.0  0.0      0     0 ?        Z    13:51   0:00 [aplay] <defunct>
alex      8921  0.0  0.0      0     0 ?        Z    13:51   0:00 [gnome-screensav] <defunct>

In my case I have broken screensaver so It's not possible to log in again. I need to switch to tty and kill screensaver after what I need to reboot.

alex-bender avatar Mar 01 '21 12:03 alex-bender