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:
parent
2f967037aa
commit
3eb6cb1875
2 changed files with 3 additions and 3 deletions
|
|
@ -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*);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue