diff options
| author | Danny Milosavljevic <dannym@friendly-machines.com> | 2026-03-14 04:37:49 +0100 |
|---|---|---|
| committer | Danny Milosavljevic <dannym@friendly-machines.com> | 2026-03-18 22:08:41 +0100 |
| commit | b2ec280cb702248730e7f705971faf170e59d00b (patch) | |
| tree | 074bd0eb378a3b53b630f39275dcc4629be106f1 | |
| parent | efb6ea4e869cc71dbfccc6e89901a6745c194314 (diff) | |
gnu: qtwayland@5: Fix rendering bug on lodpi screen in hidpi mode.
* gnu/packages/patches/qtwayland-5.15.18-0056-redraw-hidpi.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/qt.scm (qtwayland-5)[source]: Use it.
Change-Id: Iaa2c85b7f17728836465f1ae50f65a1b8dea60ef
Merges: #7127
| -rw-r--r-- | gnu/local.mk | 1 | ||||
| -rw-r--r-- | gnu/packages/patches/qtwayland-5.15.18-0056-redraw-hidpi.patch | 35 | ||||
| -rw-r--r-- | gnu/packages/qt.scm | 3 |
3 files changed, 38 insertions, 1 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index 237b0ca6c6e..c7db93ecd68 100644 --- a/gnu/local.mk +++ b/gnu/local.mk | |||
| @@ -2320,6 +2320,7 @@ dist_patch_DATA = \ | |||
| 2320 | %D%/packages/patches/qtwayland-5.15.18-0053-client-remove-some-surface-commits.patch \ | 2320 | %D%/packages/patches/qtwayland-5.15.18-0053-client-remove-some-surface-commits.patch \ |
| 2321 | %D%/packages/patches/qtwayland-5.15.18-0054-client-avoid-locking-resizing-in-qwaylandshmbackings.patch \ | 2321 | %D%/packages/patches/qtwayland-5.15.18-0054-client-avoid-locking-resizing-in-qwaylandshmbackings.patch \ |
| 2322 | %D%/packages/patches/qtwayland-5.15.18-0055-bradient-use-qwaylandwindow-actual-window-title.patch \ | 2322 | %D%/packages/patches/qtwayland-5.15.18-0055-bradient-use-qwaylandwindow-actual-window-title.patch \ |
| 2323 | %D%/packages/patches/qtwayland-5.15.18-0056-redraw-hidpi.patch \ | ||
| 2323 | %D%/packages/patches/qtwebsockets-6.9-fix-tst_QWebSocket.patch\ | 2324 | %D%/packages/patches/qtwebsockets-6.9-fix-tst_QWebSocket.patch\ |
| 2324 | %D%/packages/patches/rabbitmq-defaults.patch \ | 2325 | %D%/packages/patches/rabbitmq-defaults.patch \ |
| 2325 | %D%/packages/patches/radare2-fix-meson-build-to-use-sys-qjs.patch \ | 2326 | %D%/packages/patches/radare2-fix-meson-build-to-use-sys-qjs.patch \ |
diff --git a/gnu/packages/patches/qtwayland-5.15.18-0056-redraw-hidpi.patch b/gnu/packages/patches/qtwayland-5.15.18-0056-redraw-hidpi.patch new file mode 100644 index 00000000000..a18136a2e72 --- /dev/null +++ b/gnu/packages/patches/qtwayland-5.15.18-0056-redraw-hidpi.patch | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | From 30ed491e1ea190591260f1b73b9dad2a5926e113 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Danny Milosavljevic <dannym@friendly-machines.com> | ||
| 3 | Date: Mon, 16 Feb 2026 00:00:00 +0100 | ||
| 4 | Subject: [PATCH] Client: Force full repaint after output scale change | ||
| 5 | See: <https://invent.kde.org/qt/qt/qtwayland/-/merge_requests/89> | ||
| 6 | |||
| 7 | In handleScreensChanged(), after ensureSize(), call | ||
| 8 | requestUpdate() and sendExposeEvent() for the entire window. | ||
| 9 | This forces a full repaint at the new scale. | ||
| 10 | --- | ||
| 11 | src/client/qwaylandwindow.cpp | 8 ++++++++ | ||
| 12 | 1 file changed, 8 insertions(+) | ||
| 13 | |||
| 14 | diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp | ||
| 15 | index 7c338d27a..a8d5fe2e4 100644 | ||
| 16 | --- a/src/client/qwaylandwindow.cpp | ||
| 17 | +++ b/src/client/qwaylandwindow.cpp | ||
| 18 | @@ -1075,6 +1075,14 @@ void QWaylandWindow::handleScreensChanged() | ||
| 19 | if (mSurface && mDisplay->compositorVersion() >= 3) | ||
| 20 | mSurface->set_buffer_scale(mScale); | ||
| 21 | ensureSize(); | ||
| 22 | + // The buffer was recreated at the new scale but no widgets | ||
| 23 | + // are marked dirty, so it is uninitialized (black). Force a | ||
| 24 | + // full repaint by requesting an update and sending an expose | ||
| 25 | + // event for the entire window. | ||
| 26 | + if (isExposed()) { | ||
| 27 | + window()->requestUpdate(); | ||
| 28 | + sendExposeEvent(QRect(QPoint(), geometry().size())); | ||
| 29 | + } | ||
| 30 | } | ||
| 31 | } | ||
| 32 | |||
| 33 | -- | ||
| 34 | GitLab | ||
| 35 | |||
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 8f0e5d570aa..03eaa2db29e 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm | |||
| @@ -2290,7 +2290,8 @@ record media, and manage a collection of media content.") | |||
| 2290 | "qtwayland-5.15.18-0052-tests-fix-tst_xdgshell-minmaxsize.patch" | 2290 | "qtwayland-5.15.18-0052-tests-fix-tst_xdgshell-minmaxsize.patch" |
| 2291 | "qtwayland-5.15.18-0053-client-remove-some-surface-commits.patch" | 2291 | "qtwayland-5.15.18-0053-client-remove-some-surface-commits.patch" |
| 2292 | "qtwayland-5.15.18-0054-client-avoid-locking-resizing-in-qwaylandshmbackings.patch" | 2292 | "qtwayland-5.15.18-0054-client-avoid-locking-resizing-in-qwaylandshmbackings.patch" |
| 2293 | "qtwayland-5.15.18-0055-bradient-use-qwaylandwindow-actual-window-title.patch")) | 2293 | "qtwayland-5.15.18-0055-bradient-use-qwaylandwindow-actual-window-title.patch" |
| 2294 | "qtwayland-5.15.18-0056-redraw-hidpi.patch")) | ||
| 2294 | (sha256 | 2295 | (sha256 |
| 2295 | (base32 | 2296 | (base32 |
| 2296 | "07gqgd6ixqnsvc9r1c9y92vaxwj11ijrqvnxib8sv6xwhcmhvw43")))) | 2297 | "07gqgd6ixqnsvc9r1c9y92vaxwj11ijrqvnxib8sv6xwhcmhvw43")))) |
