From 1e385d02b371c026a3e36785d08617055827239b Mon Sep 17 00:00:00 2001 From: Ikalco <73481042+ikalco@users.noreply.github.com> Date: Tue, 16 Jul 2024 11:29:09 -0500 Subject: [PATCH] session: use deviceID instead of fd for libseat_close_device (#18) --- src/backend/Session.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/backend/Session.cpp b/src/backend/Session.cpp index 33a428b..f91d6d5 100644 --- a/src/backend/Session.cpp +++ b/src/backend/Session.cpp @@ -136,10 +136,11 @@ Aquamarine::CSessionDevice::CSessionDevice(Hyprutils::Memory::CSharedPointerlibseatHandle, 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() {