Blame SOURCES/0008-Fix-issue-with-repeated-window-size-changes.patch

f38a11
From bb9288c913dc49aefc3fad03ec243809b6b21a88 Mon Sep 17 00:00:00 2001
b814f0
From: Jaeyoon Jung <jaeyoon.jung@lge.com>
b814f0
Date: Mon, 15 Feb 2021 08:31:06 +0900
f38a11
Subject: [PATCH 08/40] Fix issue with repeated window size changes
b814f0
b814f0
Check if the new window size is different from the size requested
b814f0
previously before calling wl_egl_window_resize. It addresses the issue
b814f0
where repeated setGeometry calls between two sizes might not work as
b814f0
expected. The problem occurs when wl_egl_window_get_attached_size does
b814f0
not get the same size that was requested by the previous setGeometry
b814f0
call. If the returned size happened to match the new size instead,
b814f0
we would mistakenly skip the resize.
b814f0
b814f0
Change-Id: Iafe4a91cc707f854b9099b6109b6be1423d7bd29
b814f0
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
b814f0
(cherry picked from commit 14d066c61025e548227ccd8d655e80ffa31fa15e)
b814f0
---
b814f0
 .../client/wayland-egl/qwaylandeglwindow.cpp                  | 4 +++-
b814f0
 .../client/wayland-egl/qwaylandeglwindow.h                    | 1 +
b814f0
 2 files changed, 4 insertions(+), 1 deletion(-)
b814f0
b814f0
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp
b814f0
index 7889f575..201b583b 100644
b814f0
--- a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp
b814f0
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp
b814f0
@@ -131,14 +131,16 @@ void QWaylandEglWindow::updateSurface(bool create)
b814f0
             if (!disableResizeCheck) {
b814f0
                 wl_egl_window_get_attached_size(m_waylandEglWindow, &current_width, &current_height);
b814f0
             }
b814f0
-            if (disableResizeCheck || (current_width != sizeWithMargins.width() || current_height != sizeWithMargins.height())) {
b814f0
+            if (disableResizeCheck || (current_width != sizeWithMargins.width() || current_height != sizeWithMargins.height()) || m_requestedSize != sizeWithMargins) {
b814f0
                 wl_egl_window_resize(m_waylandEglWindow, sizeWithMargins.width(), sizeWithMargins.height(), mOffset.x(), mOffset.y());
b814f0
+                m_requestedSize = sizeWithMargins;
b814f0
                 mOffset = QPoint();
b814f0
 
b814f0
                 m_resize = true;
b814f0
             }
b814f0
         } else if (create && wlSurface()) {
b814f0
             m_waylandEglWindow = wl_egl_window_create(wlSurface(), sizeWithMargins.width(), sizeWithMargins.height());
b814f0
+            m_requestedSize = sizeWithMargins;
b814f0
         }
b814f0
 
b814f0
         if (!m_eglSurface && m_waylandEglWindow && create) {
b814f0
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.h b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.h
b814f0
index 5b1f4d56..0079dfef 100644
b814f0
--- a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.h
b814f0
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.h
b814f0
@@ -88,6 +88,7 @@ private:
b814f0
     mutable QOpenGLFramebufferObject *m_contentFBO = nullptr;
b814f0
 
b814f0
     QSurfaceFormat m_format;
b814f0
+    QSize m_requestedSize;
b814f0
 };
b814f0
 
b814f0
 }
b814f0
-- 
b814f0
2.35.1
b814f0