udev: Only handle devices from the current seat
ClosedPublic

Authored by nerdopolist on Dec 29 2017, 5:25 PM.

Details

Summary

This prevents the firstFound device, or any device detected by UdevEnumerate::find that is not from the same seat kwin is running under, from being handled

Test Plan

made sure that kwin starts on a default udev (assuming a blank ID_SEAT attribute on a device means the device is on seat0)

added /dev/dri/card1 to seat1 and /dev/dri/card0 to seat0.
Start kwin with the drm-backend on seat0 and seat1, and make sure it starts on both instances

Diff Detail

Repository
R108 KWin
Lint
Lint Skipped
Unit
Unit Tests Skipped
nerdopolist created this revision.Dec 29 2017, 5:25 PM
Restricted Application added a subscriber: kwin. · View Herald TranscriptDec 29 2017, 5:25 PM
nerdopolist edited the test plan for this revision. (Show Details)Dec 29 2017, 5:40 PM
graesslin requested changes to this revision.Dec 30 2017, 9:50 AM
graesslin added a subscriber: graesslin.
graesslin added inline comments.
udev.cpp
110

Please use QByteArray instead of c-strings

This revision now requires changes to proceed.Dec 30 2017, 9:50 AM

Update for needed changes

graesslin added inline comments.Dec 31 2017, 9:33 AM
udev.cpp
110

QString defaultSeat = QStringLiteral("seat0");

nerdopolist marked an inline comment as done.

Initialize defaultSeat properly with QStringLiteral

nerdopolist marked an inline comment as done.Jan 24 2018, 10:38 PM

Is there something that needs to be changed with this one?

Is this patch acceptable?

graesslin accepted this revision.Mar 17 2018, 11:47 AM

Sorry for the delay

This revision is now accepted and ready to land.Mar 17 2018, 11:47 AM

I cannot push the patch as arc fails with:

INFO  Base commit is not in local repository; trying to fetch.

Unfortunately the patch does not apply anymore to current KWin master :-(

Unfortunately the patch does not apply anymore to current KWin master :-(

Though I don't understand what arc does here. It tries to patch logind with a patch which is already applied. But here we don't have any changes to logind....

rkflx added a subscriber: rkflx.Mar 21 2018, 11:49 AM

@nerdopolist Please rebase on latest master and update authorship information on Phab:

git fetch
git checkout 50b948134c81
arc patch D9553
git rebase origin/master
# Check if it still compiles
arc diff
This revision was automatically updated to reflect the committed changes.