Fix listener_sessionActive
to handle an event correctly when the session get inactivated
#6696
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe your PR, what does it fix/add?
I found that Hyprland handles
m_sWLRSession->events.active
signal bylistener_sessionActive
.Hyprland/src/Compositor.cpp
Line 285 in b7f42a1
Hyprland/src/events/Misc.cpp
Lines 32 to 43 in b7f42a1
listener_sessionActive
always does an activation process.But I think
m_sWLRSession->events.active
is emitted whether the session get activated or inactivated.https://github.com/hyprwm/wlroots-hyprland/blob/422207dbcf0949e28042403edab539159282885e/backend/session/session.c#L24-L35
That's why I made the following changes:
m_sWLRSession->active
inlistener_sessionActive
.listener_sessionActive
.Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)
I'm not sure that the second change (the code for VTs) works correctly.
Is it ready for merging, or does it need work?
It is ready.