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

Session lock plugin fixes #2304

Merged
merged 3 commits into from
Apr 3, 2024
Merged

Conversation

lcolitti
Copy link
Contributor

@lcolitti lcolitti commented Apr 2, 2024

  • Ensure that if an output is added when the screenlocker has crashed, the new output is locked.
  • Support resizing outputs when locked.

lcolitti added 2 commits April 2, 2024 22:03
- Ensure that if an output is added after the client crashes,
  the lock_crashed_node is displayed on that output.
  Currently that output would simply be unlocked, oops!
  - Create the lock_crashed_node as soon as the output state is
    created, instead of when the output is locked.
  - When a lock is destroyed, only disconnect the protocol signals,
    but leave output add/remove signals connected.

- If a client crashes and the lock enters ZOMBIE state, destroy
  it as soon as the next client locks, instead of waiting until
  it unlocks. This ensures there is only one lock_crashed_node
  per output at any given time.
This is not perfect, because if the output is enlarged some of
the screen is visible for a bit until the client updates its
surface, but it works well enough for now.
Copy link
Member

@ammen99 ammen99 left a comment

Choose a reason for hiding this comment

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

LGTM, we can merge after the CI passes.

@lcolitti
Copy link
Contributor Author

lcolitti commented Apr 3, 2024 via email

@ammen99
Copy link
Member

ammen99 commented Apr 3, 2024

That said, if you think this could be useful, I can send a PR for it. My hook is very simple and just ignores the file that doesn't match, and maybe that's good enough for now.

We use a custom fork of uncrustify for formatting because the official one was kinda broken when I last used it. So I think it is not very ideal to make a git commit hook yet. I have considered moving to clang-format at some point, maybe if that happens a git hook would also be a good addition ..

Copy link
Member

@ammen99 ammen99 left a comment

Choose a reason for hiding this comment

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

Thanks!

@ammen99 ammen99 merged commit 90f460b into WayfireWM:master Apr 3, 2024
4 checks passed
@lcolitti
Copy link
Contributor Author

lcolitti commented Apr 3, 2024

We use a custom fork of uncrustify for formatting because the official one was kinda broken when I last used it. So I think it is not very ideal to make a git commit hook yet. I have considered moving to clang-format at some point, maybe if that happens a git hook would also be a good addition ..

Ack. FWIW the debian uncrustify only disagrees about this in the whole project:

  •    if constexpr (std::is_base_of_v<wf::signal::provider_t, ObjectType>)
    
  •    if constexpr (std::is_base_of_v<wf::signal::provider_t, ObjectType> )
    

@ammen99
Copy link
Member

ammen99 commented Apr 3, 2024

Ack. FWIW the debian uncrustify only disagrees about this in the whole project:

Interesting, maybe they have fixed the bugs I was experiencing, last time I tested was ~2 years ago or so.

@lcolitti lcolitti deleted the session-lock-resize branch April 3, 2024 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants