https://bugs.kde.org/show_bug.cgi?id=459136

--- Comment #12 from Jakob Petsovits <[email protected]> ---
Continuing from comment #11:

> If this is what's happening, let's see if I can fix it with a one-liner. If 
> not... well, let me give it a shot.

Well, it's a two-liner and it did solve the sizing issue. The change is to make
`XdgSurfaceWindow::moveResizeInternal()` compare the requested size not
strictly against the unchanged `clientSize()` from the last commit, but if a
configure event with a different size is already scheduled, compare against
that.

Patch below. But it flickers, so it's probably not 100% right?

--- a/src/xdgshellwindow.cpp
+++ b/src/xdgshellwindow.cpp
@@ -143,7 +143,8 @@ void XdgSurfaceWindow::moveResizeInternal(const RectF
&rect, MoveResizeMode mode
         const QSizeF requestedClientSize =
nextFrameSizeToClientSize(requestedFrameSize);
         const QSizeF roundedRequestedClientSize =
surface()->snappedSize(requestedClientSize);

-        const QSizeF roundedClientSize = surface()->snappedSize(clientSize());
+        const QSizeF nextClientSize = m_configureEvents.isEmpty() ?
clientSize() : std::as_const(m_configureEvents).last()->bounds.size();
+        const QSizeF roundedClientSize =
surface()->snappedSize(nextClientSize);
         if (roundedRequestedClientSize == roundedClientSize) {
             const RectF snappedRect = RectF(rect.topLeft(),
nextClientSizeToFrameSize(snapToPixels(roundedClientSize, nextTargetScale())));
             updateGeometry(m_nextGravity.apply(snappedRect, rect));

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to