Commit d29d181e authored by Martin Flöser's avatar Martin Flöser

[platform/virtual] Prefer vgem device over render node

If the system has a virtual device and KWin is run on virtual platform
we can assume the user intended that KWin should use the virtual device
and not a render node of the system.

This might fix the random test failures on build.kde.org (T6546).
parent 7c8003f7
......@@ -67,11 +67,11 @@ void EglGbmBackend::initGbmDevice()
return;
}
QScopedPointer<Udev> udev(new Udev);
UdevDevice::Ptr device = udev->renderNode();
UdevDevice::Ptr device = udev->virtualGpu();
if (!device) {
// if we don't have a render node, try to find a virtual (vgem) device
qCDebug(KWIN_VIRTUAL) << "No render node, looking for a vgem device";
device = udev->virtualGpu();
// if we don't have a virtual (vgem) device, try to find a render node
qCDebug(KWIN_VIRTUAL) << "No vgem device, looking for a render node";
device = udev->renderNode();
}
if (!device) {
qCDebug(KWIN_VIRTUAL) << "Neither a render node, nor a vgem device found";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment