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

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