diff --git a/src/events/Layers.cpp b/src/events/Layers.cpp index 34631136..9353c846 100644 --- a/src/events/Layers.cpp +++ b/src/events/Layers.cpp @@ -309,10 +309,10 @@ void Events::listener_commitLayerSurface(void* owner, void* data) { layersurface->position = Vector2D(layersurface->geometry.x, layersurface->geometry.y); // update geom if it changed - if (layersurface->layerSurface->surface->current.scale == 1 && PMONITOR->scale != 1.f) { + if (layersurface->layerSurface->surface->current.scale == 1 && PMONITOR->scale != 1.f && layersurface->layerSurface->surface->current.viewport.has_dst) { // 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)}; + layersurface->geometry = {layersurface->geometry.x, layersurface->geometry.y, (int)(layersurface->layerSurface->surface->current.viewport.dst_width), + (int)(layersurface->layerSurface->surface->current.viewport.dst_height)}; } 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, diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index 56547c14..c813b357 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -596,14 +596,6 @@ void CHyprRenderer::calculateUVForSurface(CWindow* pWindow, wlr_surface* pSurfac } } - const auto DESTVP = Vector2D{pSurface->current.viewport.dst_width, pSurface->current.viewport.dst_height}; - - if (DESTVP != Vector2D{} && !pWindow /* Layersurface. TODO: is this correct? */) { - const auto DESTSCALE = DESTVP / Vector2D(pSurface->buffer->texture->width, pSurface->buffer->texture->height); - uvTL = uvTL * DESTSCALE; - uvBR = uvBR * DESTSCALE; - } - g_pHyprOpenGL->m_RenderData.primarySurfaceUVTopLeft = uvTL; g_pHyprOpenGL->m_RenderData.primarySurfaceUVBottomRight = uvBR;