bring back dynamic ls geom updates

This commit is contained in:
Vaxry 2023-02-04 13:12:50 +00:00
parent bd2245d642
commit a431c1b01c

View file

@ -248,7 +248,7 @@ void Events::listener_unmapLayerSurface(void* owner, void* data) {
g_pHyprRenderer->damageBox(&geomFixed);
geomFixed = {layersurface->geometry.x, layersurface->geometry.y, (int)layersurface->layerSurface->current.actual_width, (int)layersurface->layerSurface->current.actual_height};
// layersurface->geometry = geomFixed; // because the surface can overflow... for some reason?
layersurface->geometry = geomFixed; // because the surface can overflow... for some reason?
}
void Events::listener_commitLayerSurface(void* owner, void* data) {
@ -310,8 +310,8 @@ void Events::listener_commitLayerSurface(void* owner, void* data) {
layersurface->position = Vector2D(layersurface->geometry.x, layersurface->geometry.y);
// update geom if it changed
// layersurface->geometry = {layersurface->geometry.x, layersurface->geometry.y, (int)layersurface->layerSurface->current.actual_width,
// (int)layersurface->layerSurface->current.actual_height};
layersurface->geometry = {layersurface->geometry.x, layersurface->geometry.y, (int)layersurface->layerSurface->current.actual_width,
(int)layersurface->layerSurface->current.actual_height};
g_pHyprRenderer->damageSurface(layersurface->layerSurface->surface, layersurface->position.x, layersurface->position.y);