mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 20:05:58 +01:00
fixup ls geom calcs on wp-fs-v1
This commit is contained in:
parent
cb6c47098d
commit
859d6b9b8a
1 changed files with 9 additions and 2 deletions
|
@ -309,8 +309,15 @@ void Events::listener_commitLayerSurface(void* owner, void* data) {
|
||||||
layersurface->position = Vector2D(layersurface->geometry.x, layersurface->geometry.y);
|
layersurface->position = Vector2D(layersurface->geometry.x, layersurface->geometry.y);
|
||||||
|
|
||||||
// update geom if it changed
|
// update geom if it changed
|
||||||
layersurface->geometry = {layersurface->geometry.x, layersurface->geometry.y, (int)layersurface->layerSurface->surface->current.width,
|
if (layersurface->layerSurface->surface->current.scale == 1 && PMONITOR->scale != 1.f) {
|
||||||
(int)layersurface->layerSurface->surface->current.height};
|
// fractional scaling. Dirty hack.
|
||||||
|
layersurface->geometry = {layersurface->geometry.x, layersurface->geometry.y, (int)(layersurface->layerSurface->surface->current.width / PMONITOR->scale),
|
||||||
|
(int)(layersurface->layerSurface->surface->current.height / PMONITOR->scale)};
|
||||||
|
} else {
|
||||||
|
// this is because some apps like e.g. rofi-lbonn can't fucking use the protocol correctly.
|
||||||
|
layersurface->geometry = {layersurface->geometry.x, layersurface->geometry.y, (int)layersurface->layerSurface->surface->current.width,
|
||||||
|
(int)layersurface->layerSurface->surface->current.height};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
g_pHyprRenderer->damageSurface(layersurface->layerSurface->surface, layersurface->position.x, layersurface->position.y);
|
g_pHyprRenderer->damageSurface(layersurface->layerSurface->surface, layersurface->position.x, layersurface->position.y);
|
||||||
|
|
Loading…
Reference in a new issue