This repository has been archived by the owner on Nov 1, 2021. It is now read-only.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should only set active = false if
strcmp(type, "pause") == 0
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can test that tonight if you want
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, please do.
We might want to destroy the sub-backend if the device is gone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your way seems to work as well, the following log has some debug code from @RedSoxFan as well.
https://mthode.org/dist/logs/tb-disconnect-working.log.xz
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the documentation at https://www.freedesktop.org/wiki/Software/systemd/logind/ (sorry can't link to an anchor since the id's are not unique...), it looks like there are three values:
force
,pause
, andgone
.force
is an asynchronous notification that the device was paused,pause
is a synchronous notification the device is being paused, andgone
is a notification that the device has been removed.Based on that, I think that the condition is correct as-is. Thoughts?
How would I go about doing that? I haven't really touched wlroots much
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, you're right!
wlr_backend_destroy
will probably do the trick. Ah, expect we don't have access to the sub-backend here?Let's just leave it for another PR then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, this pr is invalid because it's correct as is? What should be done to address the lock up issue then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, this PR LGTM.