diff options
author | vaxerski <[email protected]> | 2023-02-08 22:54:26 +0000 |
---|---|---|
committer | vaxerski <[email protected]> | 2023-02-08 22:54:26 +0000 |
commit | 859d6b9b8a961669c814632bbc7a1a9d94556551 (patch) | |
tree | 0b4576858d1d61881245e00fc92210a3125f5d52 | |
parent | cb6c47098d32fe937ff8f6abce7963354dca0799 (diff) | |
download | Hyprland-859d6b9b8a961669c814632bbc7a1a9d94556551.tar.gz Hyprland-859d6b9b8a961669c814632bbc7a1a9d94556551.zip |
fixup ls geom calcs on wp-fs-v1
-rw-r--r-- | src/events/Layers.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/events/Layers.cpp b/src/events/Layers.cpp index 28c54ab4..34631136 100644 --- a/src/events/Layers.cpp +++ b/src/events/Layers.cpp @@ -309,8 +309,15 @@ 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->surface->current.width, - (int)layersurface->layerSurface->surface->current.height}; + if (layersurface->layerSurface->surface->current.scale == 1 && PMONITOR->scale != 1.f) { + // 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); |