diff --git a/udev.cpp b/udev.cpp index e3b2406c3b..f064b089b6 100644 --- a/udev.cpp +++ b/udev.cpp @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . *********************************************************************/ #include "udev.h" +#include "logind.h" // Qt #include #include @@ -106,6 +107,7 @@ UdevDevice::Ptr UdevEnumerate::find(std::functionproperty("ID_SEAT"); + if (deviceSeat.isEmpty()) { + deviceSeat = defaultSeat; + } + if (deviceSeat != LogindIntegration::self()->seat()) { + continue; + } if (test(device)) { return device; } @@ -135,7 +144,6 @@ UdevDevice::Ptr Udev::primaryGpu() enumerate.addMatch(UdevEnumerate::Match::SysName, "card[0-9]*"); enumerate.scan(); return enumerate.find([](const UdevDevice::Ptr &device) { - // TODO: check seat auto pci = device->getParentWithSubsystemDevType("pci"); if (!pci) { return false;