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 the check for locking a locked session #6843

Merged
merged 1 commit into from
Jul 11, 2024

Conversation

PaideiaDilemma
Copy link
Contributor

Describe your PR, what does it fix/add?

It fixes the following misbehavior:

When a client holds a locked session lock object and another client tries to lock the session as well, the second client will receive finished. When the second client never calls destroy or unlock_and_destroy it effectively blocks the user from locking the session, because m_vLocks still contains the lock object that was not destroyed.

I think this is the correct behavior. Since RESOURCE->inert is set whenever sendFinished is called anyways, it should also be safe for the left over lock object to send unlock_and_destroy at some point.

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

Please check if i am correct, but should be fine.

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

Ready.

Copy link
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@vaxerski vaxerski merged commit 9ff83f4 into hyprwm:main Jul 11, 2024
10 of 11 checks passed
DawfukFR pushed a commit to DawfukFR/Hyprland that referenced this pull request Jul 12, 2024
PaideiaDilemma added a commit to PaideiaDilemma/Hyprland that referenced this pull request Aug 25, 2024
vaxerski pushed a commit that referenced this pull request Aug 26, 2024
* Revert "sessionLock: fix the check for locking a locked session (#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.

2 participants