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,10 +136,11 @@ Aquamarine::CSessionDevice::CSessionDevice(Hyprutils::Memory::CSharedPointer<CSe
|
||||||
}
|
}
|
||||||
|
|
||||||
Aquamarine::CSessionDevice::~CSessionDevice() {
|
Aquamarine::CSessionDevice::~CSessionDevice() {
|
||||||
if (fd < 0)
|
if (deviceID >= 0)
|
||||||
return;
|
if (libseat_close_device(session->libseatHandle, deviceID) < 0)
|
||||||
libseat_close_device(session->libseatHandle, fd);
|
session->backend->log(AQ_LOG_ERROR, std::format("libseat: Couldn't close device at {}", path));
|
||||||
close(fd);
|
if (fd >= 0)
|
||||||
|
close(fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Aquamarine::CSessionDevice::supportsKMS() {
|
bool Aquamarine::CSessionDevice::supportsKMS() {
|
||||||
|
|
Loading…
Reference in a new issue