aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorvaxerski <[email protected]>2022-04-25 21:49:45 +0200
committervaxerski <[email protected]>2022-04-25 21:49:45 +0200
commitcabab409e6eb331ff435147dd12c16c7f507ce05 (patch)
treef1bf20b3fbabdec34d4ff7b82a923718113f2b0f
parent9eae3b3c3bdef052f93c9d63fe29aca77c2df206 (diff)
downloadHyprland-cabab409e6eb331ff435147dd12c16c7f507ce05.tar.gz
Hyprland-cabab409e6eb331ff435147dd12c16c7f507ce05.zip
fixed overlay layers being on bottom of fullscreen windows
-rw-r--r--src/managers/InputManager.cpp10
-rw-r--r--src/render/Renderer.cpp6
2 files changed, 11 insertions, 5 deletions
diff --git a/src/managers/InputManager.cpp b/src/managers/InputManager.cpp
index e450775e..eacf7e40 100644
--- a/src/managers/InputManager.cpp
+++ b/src/managers/InputManager.cpp
@@ -51,7 +51,11 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
Vector2D surfacePos = Vector2D(-1337, -1337);
CWindow* pFoundWindow = nullptr;
- // first, we check if the workspace doesnt have a fullscreen window
+ // overlay is above fullscreen
+ if (!foundSurface)
+ foundSurface = g_pCompositor->vectorToLayerSurface(mouseCoords, &PMONITOR->m_aLayerSurfaceLists[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY], &surfaceCoords);
+
+ // then, we check if the workspace doesnt have a fullscreen window
const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(PMONITOR->activeWorkspace);
if (PWORKSPACE->m_bHasFullscreenWindow && !foundSurface) {
pFoundWindow = g_pCompositor->getFullscreenWindowOnWorkspace(PWORKSPACE->m_iID);
@@ -77,10 +81,6 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
}
}
- // then surfaces on top
- if (!foundSurface)
- foundSurface = g_pCompositor->vectorToLayerSurface(mouseCoords, &PMONITOR->m_aLayerSurfaceLists[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY], &surfaceCoords);
-
if (!foundSurface)
foundSurface = g_pCompositor->vectorToLayerSurface(mouseCoords, &PMONITOR->m_aLayerSurfaceLists[ZWLR_LAYER_SHELL_V1_LAYER_TOP], &surfaceCoords);
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp
index 2c685f98..bf4aa6d6 100644
--- a/src/render/Renderer.cpp
+++ b/src/render/Renderer.cpp
@@ -67,6 +67,12 @@ void CHyprRenderer::renderWorkspaceWithFullscreenWindow(SMonitor* pMonitor, CWor
renderWindow(&w, pMonitor, time, true);
}
+ // and the overlay layers
+ for (auto& ls : pMonitor->m_aLayerSurfaceLists[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY]) {
+ SRenderData renderdata = {pMonitor->output, time, ls->geometry.x, ls->geometry.y};
+ wlr_surface_for_each_surface(ls->layerSurface->surface, renderSurface, &renderdata);
+ }
+
renderDragIcon(pMonitor, time);
// if correct monitor draw hyprerror