mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-23 10:49:52 +01:00
schedule recalcs in LS
This commit is contained in:
parent
99ebbb36b2
commit
b18a2738e3
3 changed files with 10 additions and 4 deletions
|
@ -89,7 +89,7 @@ void Events::listener_destroyLayerSurface(void* owner, void* data) {
|
||||||
// rearrange to fix the reserved areas
|
// rearrange to fix the reserved areas
|
||||||
if (PMONITOR) {
|
if (PMONITOR) {
|
||||||
g_pHyprRenderer->arrangeLayersForMonitor(PMONITOR->ID);
|
g_pHyprRenderer->arrangeLayersForMonitor(PMONITOR->ID);
|
||||||
g_pLayoutManager->getCurrentLayout()->recalculateMonitor(PMONITOR->ID);
|
PMONITOR->scheduledRecalc = true;
|
||||||
|
|
||||||
// and damage
|
// and damage
|
||||||
wlr_box geomFixed = {layersurface->geometry.x + PMONITOR->vecPosition.x, layersurface->geometry.y + PMONITOR->vecPosition.y, layersurface->geometry.width, layersurface->geometry.height};
|
wlr_box geomFixed = {layersurface->geometry.x + PMONITOR->vecPosition.x, layersurface->geometry.y + PMONITOR->vecPosition.y, layersurface->geometry.width, layersurface->geometry.height};
|
||||||
|
@ -124,7 +124,7 @@ void Events::listener_mapLayerSurface(void* owner, void* data) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
layersurface->monitorID = PMONITOR->ID;
|
layersurface->monitorID = PMONITOR->ID;
|
||||||
g_pLayoutManager->getCurrentLayout()->recalculateMonitor(POLDMON->ID);
|
PMONITOR->scheduledRecalc = true;
|
||||||
g_pHyprRenderer->arrangeLayersForMonitor(POLDMON->ID);
|
g_pHyprRenderer->arrangeLayersForMonitor(POLDMON->ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -229,7 +229,7 @@ void Events::listener_commitLayerSurface(void* owner, void* data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
layersurface->monitorID = PMONITOR->ID;
|
layersurface->monitorID = PMONITOR->ID;
|
||||||
g_pLayoutManager->getCurrentLayout()->recalculateMonitor(POLDMON->ID);
|
PMONITOR->scheduledRecalc = true;
|
||||||
g_pHyprRenderer->arrangeLayersForMonitor(POLDMON->ID);
|
g_pHyprRenderer->arrangeLayersForMonitor(POLDMON->ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -249,7 +249,7 @@ void Events::listener_commitLayerSurface(void* owner, void* data) {
|
||||||
|
|
||||||
g_pHyprRenderer->arrangeLayersForMonitor(PMONITOR->ID);
|
g_pHyprRenderer->arrangeLayersForMonitor(PMONITOR->ID);
|
||||||
|
|
||||||
g_pLayoutManager->getCurrentLayout()->recalculateMonitor(PMONITOR->ID);
|
PMONITOR->scheduledRecalc = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
layersurface->position = Vector2D(layersurface->geometry.x, layersurface->geometry.y);
|
layersurface->position = Vector2D(layersurface->geometry.x, layersurface->geometry.y);
|
||||||
|
|
|
@ -214,6 +214,11 @@ void Events::listener_monitorFrame(void* owner, void* data) {
|
||||||
}
|
}
|
||||||
// //
|
// //
|
||||||
|
|
||||||
|
if (PMONITOR->scheduledRecalc) {
|
||||||
|
PMONITOR->scheduledRecalc = false;
|
||||||
|
g_pLayoutManager->getCurrentLayout()->recalculateMonitor(PMONITOR->ID);
|
||||||
|
}
|
||||||
|
|
||||||
timespec now;
|
timespec now;
|
||||||
clock_gettime(CLOCK_MONOTONIC, &now);
|
clock_gettime(CLOCK_MONOTONIC, &now);
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,7 @@ struct SMonitor {
|
||||||
int framesToSkip = 0;
|
int framesToSkip = 0;
|
||||||
int forceFullFrames = 0;
|
int forceFullFrames = 0;
|
||||||
bool noFrameSchedule = false;
|
bool noFrameSchedule = false;
|
||||||
|
bool scheduledRecalc = false;
|
||||||
wl_output_transform transform = WL_OUTPUT_TRANSFORM_NORMAL;
|
wl_output_transform transform = WL_OUTPUT_TRANSFORM_NORMAL;
|
||||||
|
|
||||||
// for the special workspace
|
// for the special workspace
|
||||||
|
|
Loading…
Reference in a new issue