xdg: use std::ceil for sending scale to surfaces

fixes #3724
This commit is contained in:
Vaxry 2023-11-02 23:29:47 +00:00
parent ba9e7814b0
commit 88b47dfa83

View File

@ -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) {