Skip to Content.
Sympa Menu

sm-commit - [[SM-Commit] ] GIT changes to master grimoire by Treeve Jelbert (ad98ea8bf0741b51a45d2e600d941c3ad434ea69)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Treeve Jelbert <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org, sm-commit AT lists.sourcemage.org
  • Subject: [[SM-Commit] ] GIT changes to master grimoire by Treeve Jelbert (ad98ea8bf0741b51a45d2e600d941c3ad434ea69)
  • Date: Wed, 7 Aug 2024 09:22:43 +0000

GIT changes to master grimoire by Treeve Jelbert <treeve AT sourcemage.org>:

qt6/qt6wayland/DETAILS | 2
qt6/qt6wayland/HISTORY | 4 +
qt6/qt6wayland/patches/eglwindow.diff | 60
+++++++++++++++++++++++++++++
qt6/qt6wayland/patches/qwaylandwindow.diff | 13 ++++++
4 files changed, 78 insertions(+), 1 deletion(-)

New commits:
commit ad98ea8bf0741b51a45d2e600d941c3ad434ea69
Author: Treeve Jelbert <treeve AT sourcemage.org>
Commit: Treeve Jelbert <treeve AT sourcemage.org>

qt6wayland - patches from kde

diff --git a/qt6/qt6wayland/DETAILS b/qt6/qt6wayland/DETAILS
index 690ea58..6d96179 100755
--- a/qt6/qt6wayland/DETAILS
+++ b/qt6/qt6wayland/DETAILS
@@ -1,7 +1,7 @@
SPELL=qt6wayland
source $GRIMOIRE/$SECTION/QT6_VERSIONS

-PATCHLEVEL=1
+PATCHLEVEL=2
# SECURITY_PATCH=2
ENTERED=20210116
SHORT=""
diff --git a/qt6/qt6wayland/HISTORY b/qt6/qt6wayland/HISTORY
index ae21ca5..f756c9f 100644
--- a/qt6/qt6wayland/HISTORY
+++ b/qt6/qt6wayland/HISTORY
@@ -1,3 +1,7 @@
+2024-08-06 Treeve Jelbert <treeve AT sourcemage.org>
+ * eglwindow.diff qwaylandwindow.diff: added
+ * DETAILS: PATCHLEVEL++
+
2024-07-09 Treeve Jelbert <treeve AT sourcemage.org>
* PRE_BUILD patches/*: added
* DETAILS: PATCHLEVEL=1
diff --git a/qt6/qt6wayland/patches/eglwindow.diff
b/qt6/qt6wayland/patches/eglwindow.diff
new file mode 100644
index 0000000..0f69597
--- /dev/null
+++ b/qt6/qt6wayland/patches/eglwindow.diff
@@ -0,0 +1,60 @@
+diff --git
a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp
b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp
+index
652a6563087702a2b5b0e5d226110967f06db77e..44f1038c3e5e10985645523493997d2f376bf592
100644
+--- a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp
++++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp
+@@ -50,6 +50,15 @@ QWaylandWindow::WindowType
QWaylandEglWindow::windowType() const
+
+ void QWaylandEglWindow::ensureSize()
+ {
++ // this is always called on the main thread
++ QMargins margins = mWindowDecoration ? frameMargins() : QMargins{};
++ QRect rect = geometry();
++ QSize sizeWithMargins = (rect.size() + QSize(margins.left() +
margins.right(), margins.top() + margins.bottom())) * scale();
++ {
++ QWriteLocker lock(&m_bufferSizeLock);
++ m_bufferSize = sizeWithMargins;
++ }
++
+ updateSurface(false);
+ }
+
+@@ -60,14 +69,17 @@ void QWaylandEglWindow::setGeometry(const QRect &rect)
+ // we're now getting a resize we don't want to create it again.
+ // Just resize the wl_egl_window, the EGLSurface will be created
+ // the next time makeCurrent is called.
+- updateSurface(false);
++ ensureSize();
+ }
+
+ void QWaylandEglWindow::updateSurface(bool create)
+ {
+- QMargins margins = mWindowDecoration ? frameMargins() : QMargins{};
+- QRect rect = geometry();
+- QSize sizeWithMargins = (rect.size() + QSize(margins.left() +
margins.right(), margins.top() + margins.bottom())) * scale();
++
++ QSize sizeWithMargins;
++ {
++ QReadLocker lock(&m_bufferSizeLock);
++ sizeWithMargins = m_bufferSize;
++ }
+
+ // wl_egl_windows must have both width and height > 0
+ // mesa's egl returns NULL if we try to create a, invalid
wl_egl_window, however not all EGL
+diff --git
a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow_p.h
b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow_p.h
+index
5b9aa9874b1307d6c6847ce89fbc760176fad59f..048f0b610e37ca5e5045bc0658c2ff242a3aa029
100644
+--- a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow_p.h
++++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow_p.h
+@@ -60,7 +60,13 @@ private:
+ mutable QOpenGLFramebufferObject *m_contentFBO = nullptr;
+
+ QSurfaceFormat m_format;
++ // Size used in the last call to wl_egl_window_resize
+ QSize m_requestedSize;
++
++ // Size of the buffer used by QWaylandWindow
++ // This is always written to from the main thread, potentially read
from the rendering thread
++ QReadWriteLock m_bufferSizeLock;
++ QSize m_bufferSize;
+ };
+
+ }
diff --git a/qt6/qt6wayland/patches/qwaylandwindow.diff
b/qt6/qt6wayland/patches/qwaylandwindow.diff
new file mode 100644
index 0000000..f61bacf
--- /dev/null
+++ b/qt6/qt6wayland/patches/qwaylandwindow.diff
@@ -0,0 +1,13 @@
+diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
+index
c3725ffc9891f0aead47ecbeb94affc21e0b82ed..1923731846062ad8aa28e96f26495ff6b8dbcb7f
100644
+--- a/src/client/qwaylandwindow.cpp
++++ b/src/client/qwaylandwindow.cpp
+@@ -1407,7 +1407,7 @@ void QWaylandWindow::handleScreensChanged()
+ {
+ QPlatformScreen *newScreen = calculateScreenFromSurfaceEvents();
+
+- if (newScreen->screen() == window()->screen())
++ if (!newScreen || newScreen->screen() == window()->screen())
+ return;
+
+ QWindowSystemInterface::handleWindowScreenChanged(window(),
newScreen->QPlatformScreen::screen());


  • [[SM-Commit] ] GIT changes to master grimoire by Treeve Jelbert (ad98ea8bf0741b51a45d2e600d941c3ad434ea69), Treeve Jelbert, 08/07/2024

Archive powered by MHonArc 2.6.24.

Top of Page