Package: konsole
Version: 4:25.04.2-1
Severity: normal
Tags: patch upstream fixed-upstream
Control: forwarded -1 https://bugs.kde.org/show_bug.cgi?id=491562
Control: fixed -1 4:26.08.2-1

Dear Maintainer,

With a fractional display scale on Wayland, Konsole sometimes leaves
small traces behind. They look like underscores, one character wide,
and often appear right after the text cursor. A resize or "reset"
clears them until they come back.

Setup: Debian 13, Plasma 6.3.6 on Wayland, Qt 6.8.2, scale 1.1.
The upstream report says the bug does not happen at scale 1.0.
Bug #910347 is an older report of a similar problem.

This is upstream bug 491562. It is fixed in Konsole 25.08 by commit
94304ed698014d1ea519954433581d5ab5de00c3:
https://invent.kde.org/utilities/konsole/-/commit/94304ed698014d1ea519954433581d5ab5de00c3

The fix is one line in src/terminalDisplay/TerminalDisplay.h. The
function highdpi_adjust_rect() returned the rect unchanged in Qt6
builds. The fix makes it grow the rect by 1px again, as in Qt5 builds.
Repaints then cover the pixels that rounding left out.

The attached patch is that commit as a quilt patch. It applies cleanly
to 4:25.04.2-1, and the package builds with it.

Konsole 26.08.2 in testing and unstable already has the fix. Please
consider the patch for a trixie point release, or for the next stable
update of konsole.

Thanks!
Description: Fix glitches on high-DPI displays with fractional scaling
 Backport of upstream commit 94304ed698014d1ea519954433581d5ab5de00c3
 (Konsole 25.08). Qt6 builds did not grow the repaint rect by 1px, so
 underline-like traces were left behind at scales such as 1.1 or 1.25.
Bug: https://bugs.kde.org/show_bug.cgi?id=491562
Origin: upstream, https://invent.kde.org/utilities/konsole/-/commit/94304ed698014d1ea519954433581d5ab5de00c3
--- a/src/terminalDisplay/TerminalDisplay.h
+++ b/src/terminalDisplay/TerminalDisplay.h
@@ -65,12 +65,10 @@ class Profile;
  * This function adjusts a rect by adding a 1px border around it. The idea is to
  * compensate in case of approximation issues on highdpi displays with fractional
  * scaling applied.
- * As Qt6 may not be affected by this issue, the adjustment is not added in that
- * case. Hopefully the compiler ignores this function in that case.
  */
 inline QRect highdpi_adjust_rect(const QRect &rect)
 {
-    return rect;
+    return rect.adjusted(-1, -1, 1, 1);
 }
 
 /**

Reply via email to