Skip to content

Commit

Permalink
session: use deviceID instead of fd for libseat_close_device (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
ikalco authored Jul 16, 2024
1 parent d6791cc commit 1e385d0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/backend/Session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 1e385d0

Please sign in to comment.