aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorVaxry <[email protected]>2023-11-02 23:29:47 +0000
committerVaxry <[email protected]>2023-11-02 23:29:47 +0000
commit88b47dfa833db2d230a2d6e6bbbf92c69afbdc28 (patch)
tree829fedb92e1905d18e528a4694710b88bfb4be86
parentba9e7814b0e02be251ff6172d644de59cf0170de (diff)
downloadHyprland-88b47dfa833db2d230a2d6e6bbbf92c69afbdc28.tar.gz
Hyprland-88b47dfa833db2d230a2d6e6bbbf92c69afbdc28.zip
xdg: use std::ceil for sending scale to surfaces
fixes #3724
-rw-r--r--src/Compositor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp
index 681cbf86..f8d61501 100644
--- a/src/Compositor.cpp
+++ b/src/Compositor.cpp
@@ -2712,7 +2712,7 @@ void CCompositor::leaveUnsafeState() {
void CCompositor::setPreferredScaleForSurface(wlr_surface* pSurface, double scale) {
g_pProtocolManager->m_pFractionalScaleProtocolManager->setPreferredScaleForSurface(pSurface, scale);
- wlr_surface_set_preferred_buffer_scale(pSurface, scale);
+ wlr_surface_set_preferred_buffer_scale(pSurface, static_cast<int32_t>(std::ceil(scale)));
}
void CCompositor::setPreferredTransformForSurface(wlr_surface* pSurface, wl_output_transform transform) {