Преглед на файлове

ignore empty viewports in geom

vaxerski преди 3 години
родител
ревизия
723be5af70
променени са 1 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 3 0
      src/WallpaperEngine/Render/Drivers/Output/CWaylandOutput.cpp

+ 3 - 0
src/WallpaperEngine/Render/Drivers/Output/CWaylandOutput.cpp

@@ -20,6 +20,9 @@ void CWaylandOutput::updateViewports() {
     const auto PDRIVER = (CWaylandOpenGLDriver*)&m_driver;
     glm::ivec2 fullw = {0,0};
     for (auto& o : PDRIVER->m_outputs) {
+        if (!o->layerSurface.get())
+            continue;
+
         m_viewports[o->name] = {{0, 0, o->lsSize.x * o->scale, o->lsSize.y * o->scale}, o->name};
 
         fullw = fullw + glm::ivec2{o->lsSize.x * o->scale, 0};