mirror of
https://github.com/hyprwm/aquamarine.git
synced 2024-11-17 02:35:59 +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,9 +136,10 @@ Aquamarine::CSessionDevice::CSessionDevice(Hyprutils::Memory::CSharedPointer<CSe
|
|||
}
|
||||
|
||||
Aquamarine::CSessionDevice::~CSessionDevice() {
|
||||
if (fd < 0)
|
||||
return;
|
||||
libseat_close_device(session->libseatHandle, 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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue