From 08836ba471cae516550f79275a1e28d2bab4bb28 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Tue, 12 Sep 2023 17:11:11 +0300 Subject: [PATCH] wayland: Port to OutputTransform::map(QSize) --- src/wayland/surface_interface.cpp | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/src/wayland/surface_interface.cpp b/src/wayland/surface_interface.cpp index b5918f2702..d0b4e7e1ea 100644 --- a/src/wayland/surface_interface.cpp +++ b/src/wayland/surface_interface.cpp @@ -655,25 +655,10 @@ void SurfaceInterfacePrivate::applyState(SurfaceState *next) bufferRef = current->buffer; scaleOverride = pendingScaleOverride; - // TODO: Refactor the state management code because it gets more clumsy. if (current->buffer) { bufferSize = current->buffer->size(); bufferSourceBox = computeBufferSourceBox(); - - implicitSurfaceSize = current->buffer->size() / current->bufferScale; - switch (current->bufferTransform.kind()) { - case KWin::OutputTransform::Rotated90: - case KWin::OutputTransform::Rotated270: - case KWin::OutputTransform::Flipped90: - case KWin::OutputTransform::Flipped270: - implicitSurfaceSize.transpose(); - break; - case KWin::OutputTransform::Normal: - case KWin::OutputTransform::Rotated180: - case KWin::OutputTransform::Flipped: - case KWin::OutputTransform::Flipped180: - break; - } + implicitSurfaceSize = current->bufferTransform.map(current->buffer->size() / current->bufferScale); if (current->viewport.destinationSize.isValid()) { surfaceSize = current->viewport.destinationSize;