summaryrefslogtreecommitdiff
path: root/src/render/Renderer.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-05-31 14:01:00 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-05-31 14:01:00 +0200
commit0055efc4f1e44b440cb5649bece2b6358d01f24a (patch)
tree79e17d427d34f397f5d64e679be4396d8963ef91 /src/render/Renderer.cpp
parentdf722cbb86bdc3b45827234c34e6ab90d02d5068 (diff)
Added a special workspace
Diffstat (limited to 'src/render/Renderer.cpp')
-rw-r--r--src/render/Renderer.cpp26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp
index 1c661829..7ee9f47a 100644
--- a/src/render/Renderer.cpp
+++ b/src/render/Renderer.cpp
@@ -46,6 +46,9 @@ bool shouldRenderWindow(CWindow* pWindow, SMonitor* pMonitor) {
if (g_pCompositor->isWorkspaceVisible(pWindow->m_iWorkspaceID) || (PWORKSPACE && PWORKSPACE->m_iMonitorID == pMonitor->ID && (PWORKSPACE->m_vRenderOffset.isBeingAnimated() || PWORKSPACE->m_fAlpha.isBeingAnimated())))
return true;
+ if (pMonitor->specialWorkspaceOpen && pWindow->m_iWorkspaceID == SPECIAL_WORKSPACE_ID)
+ return true;
+
return false;
}
@@ -176,7 +179,10 @@ void CHyprRenderer::renderAllClientsForMonitor(const int& ID, timespec* time) {
continue;
if (w.m_bIsFloating)
- continue; // floating are in second pass
+ continue; // floating are in the second pass
+
+ if (w.m_iWorkspaceID == SPECIAL_WORKSPACE_ID)
+ continue; // special are in the third pass
if (!shouldRenderWindow(&w, PMONITOR))
continue;
@@ -193,6 +199,24 @@ void CHyprRenderer::renderAllClientsForMonitor(const int& ID, timespec* time) {
if (!w.m_bIsFloating)
continue;
+ if (w.m_iWorkspaceID == SPECIAL_WORKSPACE_ID)
+ continue;
+
+ if (!shouldRenderWindow(&w, PMONITOR))
+ continue;
+
+ // render the bad boy
+ renderWindow(&w, PMONITOR, time, true);
+ }
+
+ // and then special
+ for (auto& w : g_pCompositor->m_lWindows) {
+ if (!g_pCompositor->windowValidMapped(&w) && !w.m_bFadingOut)
+ continue;
+
+ if (w.m_iWorkspaceID != SPECIAL_WORKSPACE_ID)
+ continue;
+
if (!shouldRenderWindow(&w, PMONITOR))
continue;