backends/drm: check explicit gpu paths for symlinks
Otherwise we don't process hotplugs when we should
This commit is contained in:
parent
9add143a40
commit
261121547d
1 changed files with 5 additions and 1 deletions
|
@ -29,6 +29,7 @@
|
||||||
#include <KLocalizedString>
|
#include <KLocalizedString>
|
||||||
// Qt
|
// Qt
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
|
#include <QFileInfo>
|
||||||
#include <QSocketNotifier>
|
#include <QSocketNotifier>
|
||||||
#include <QStringBuilder>
|
#include <QStringBuilder>
|
||||||
// system
|
// system
|
||||||
|
@ -174,7 +175,10 @@ void DrmBackend::handleUdevEvent()
|
||||||
while (auto device = m_udevMonitor->getDevice()) {
|
while (auto device = m_udevMonitor->getDevice()) {
|
||||||
// Ignore the device seat if the KWIN_DRM_DEVICES envvar is set.
|
// Ignore the device seat if the KWIN_DRM_DEVICES envvar is set.
|
||||||
if (!m_explicitGpus.isEmpty()) {
|
if (!m_explicitGpus.isEmpty()) {
|
||||||
if (!m_explicitGpus.contains(device->devNode())) {
|
const bool foundMatch = std::any_of(m_explicitGpus.begin(), m_explicitGpus.end(), [&device](const QString &explicitPath) {
|
||||||
|
return QFileInfo(explicitPath).canonicalPath() == QFileInfo(device->devNode()).canonicalPath();
|
||||||
|
});
|
||||||
|
if (!foundMatch) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue