From d29d181e7cca4ce6905f1b53f8f3f0d68b9e6fbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Fl=C3=B6ser?= Date: Fri, 29 Sep 2017 21:20:12 +0200 Subject: [PATCH] [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). --- plugins/platforms/virtual/egl_gbm_backend.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/platforms/virtual/egl_gbm_backend.cpp b/plugins/platforms/virtual/egl_gbm_backend.cpp index f009003ced..87a064db83 100644 --- a/plugins/platforms/virtual/egl_gbm_backend.cpp +++ b/plugins/platforms/virtual/egl_gbm_backend.cpp @@ -67,11 +67,11 @@ void EglGbmBackend::initGbmDevice() return; } QScopedPointer 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";