mirror of
https://github.com/hyprwm/aquamarine.git
synced 2024-11-17 03:46:00 +01:00
session: use deviceID instead of fd for libseat_close_device (#18)
This commit is contained in:
parent
d6791cc5ce
commit
1e385d02b3
1 changed files with 5 additions and 4 deletions
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue