session: use deviceID instead of fd for libseat_close_device (#18)

This commit is contained in:
Ikalco 2024-07-16 11:29:09 -05:00 committed by GitHub
parent d6791cc5ce
commit 1e385d02b3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -136,10 +136,11 @@ Aquamarine::CSessionDevice::CSessionDevice(Hyprutils::Memory::CSharedPointer<CSe
}
Aquamarine::CSessionDevice::~CSessionDevice() {
if (fd < 0)
return;
libseat_close_device(session->libseatHandle, fd);
close(fd);
if (deviceID >= 0)
if (libseat_close_device(session->libseatHandle, deviceID) < 0)
session->backend->log(AQ_LOG_ERROR, std::format("libseat: Couldn't close device at {}", path));
if (fd >= 0)
close(fd);
}
bool Aquamarine::CSessionDevice::supportsKMS() {