Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sessionLock: fix misc:allow_session_lock_restore #7511

Merged
merged 2 commits into from
Aug 26, 2024

Conversation

PaideiaDilemma
Copy link
Contributor

Describe your PR, what does it fix/add?

I broke misc:allow_session_lock_restore with #6843.
The session beeing locked is checked in the onNewSessionLock handler, which also respects the
misc:allow_session_lock_restore option. So i removed the check in CSessionLockProtocol::onLock.

Closes #7455

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

The misc:allow_session_lock_restore option is a bit dangerous when hyprlock is configured with grace is used.
For example when a idle deamon lanches hyprlock a second time without --immediate and then the session can sudently be unlocked via grace.

Maybe we should ad a disclaimer to the grace option in the wiki.

Is it ready for merging, or does it need work?

Tested it, seems to behave as expected.

  • crash handler of hyprlock can recover the session.
  • when the option is disabled it does not work and new hyprlock instances recieve finished
  • launching a second hyprlock instance with the option enabled results in two locks, which seems to work, except the grace problem mentioned above.

It is checked in the `onNewSessionLock` handler, which also respects the
`misc:allow_session_lock_restore` option.
@vaxerski vaxerski merged commit 28f6c2d into hyprwm:main Aug 26, 2024
10 checks passed
m4r1vs pushed a commit to m4r1vs/Hyprland that referenced this pull request Oct 28, 2024
* Revert "sessionLock: fix the check for locking a locked session (hyprwm#6843)"

This reverts commit 9ff83f4.

* sessionLock: remove early check for session beeing locked

It is checked in the `onNewSessionLock` handler, which also respects the
`misc:allow_session_lock_restore` option.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to restart session lock
2 participants