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