diff --git a/src/events/Layers.cpp b/src/events/Layers.cpp index 92200d04..cc5d935f 100644 --- a/src/events/Layers.cpp +++ b/src/events/Layers.cpp @@ -234,8 +234,6 @@ void Events::listener_commitLayerSurface(void* owner, void* data) { } if (layersurface->layerSurface->current.committed != 0) { - g_pHyprRenderer->arrangeLayersForMonitor(PMONITOR->ID); - if (layersurface->layer != layersurface->layerSurface->current.layer) { for (auto it = PMONITOR->m_aLayerSurfaceLists[layersurface->layer].begin(); it != PMONITOR->m_aLayerSurfaceLists[layersurface->layer].end(); it++) { @@ -249,6 +247,8 @@ void Events::listener_commitLayerSurface(void* owner, void* data) { layersurface->layer = layersurface->layerSurface->current.layer; } + g_pHyprRenderer->arrangeLayersForMonitor(PMONITOR->ID); + g_pLayoutManager->getCurrentLayout()->recalculateMonitor(PMONITOR->ID); }