syncobj: ensure we only add waiters on succesful checks (#9412)

timeline check only returns nullopt on ETIME_ERR , meaning the if check
later on returns true if drmSyncobjTimelineWait returns anything else
like EINVAL/EPERM/EACCESS etc, so actually check the returned .value()
of the std::optional. also move the fd to rvalue references.
This commit is contained in:
Tom Englund 2025-02-15 14:48:52 +01:00 committed by GitHub
parent 2f967037aa
commit 3eb6cb1875
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View file

@ -33,7 +33,7 @@ class CDRMSyncobjSurfaceResource {
class CDRMSyncobjTimelineResource {
public:
CDRMSyncobjTimelineResource(SP<CWpLinuxDrmSyncobjTimelineV1> resource_, Hyprutils::OS::CFileDescriptor fd_);
CDRMSyncobjTimelineResource(SP<CWpLinuxDrmSyncobjTimelineV1> resource_, Hyprutils::OS::CFileDescriptor&& fd_);
~CDRMSyncobjTimelineResource() = default;
static SP<CDRMSyncobjTimelineResource> fromResource(wl_resource*);