diff options
| author | Andreas Sturmlechner <asturm@gentoo.org> | 2019-03-06 15:32:32 +0100 |
|---|---|---|
| committer | Andreas Sturmlechner <asturm@gentoo.org> | 2019-03-06 15:32:32 +0100 |
| commit | 42accedeeb919a0aeb10f67d4cbde001b8fee38f (patch) | |
| tree | 90a2c1ab75814bbad50c4833554e53df5885794f | |
| parent | 6c9c50171cc7106f0d9c0d36e65cecaf514665f9 (diff) | |
| download | kde-42accedeeb919a0aeb10f67d4cbde001b8fee38f.tar.gz kde-42accedeeb919a0aeb10f67d4cbde001b8fee38f.tar.bz2 kde-42accedeeb919a0aeb10f67d4cbde001b8fee38f.zip | |
kde-apps/konsole: Fix disappearing/non-moving cursor
KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=402589
Bug: https://bugs.gentoo.org/673766
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11
| -rw-r--r-- | kde-apps/konsole/files/konsole-18.12.3-cursor.patch | 84 | ||||
| -rw-r--r-- | kde-apps/konsole/konsole-18.12.3.ebuild | 2 |
2 files changed, 86 insertions, 0 deletions
diff --git a/kde-apps/konsole/files/konsole-18.12.3-cursor.patch b/kde-apps/konsole/files/konsole-18.12.3-cursor.patch new file mode 100644 index 00000000000..f9960340b90 --- /dev/null +++ b/kde-apps/konsole/files/konsole-18.12.3-cursor.patch @@ -0,0 +1,84 @@ +From eccfb1f62bbf67ebffee11e241bd05757b826ff1 Mon Sep 17 00:00:00 2001 +From: Wolfgang Bauer <wbauer@tmo.at> +Date: Mon, 4 Mar 2019 09:59:45 -0500 +Subject: Fix ibeam and underline cursor rendering + +Summary: +Since anti-aliasing was enabled in the painter, coordinates need to +be shifted half a pixel so that they align with the pixel grid, +otherwise the result gets "blurred" due to the anti-aliasing. +And as parts of the blurred shape leak outside the cursor rectangle, +this also leaves artifacts when the cursor moves or blinks as these +parts are not cleared. + +This is basically the same as commit +e7085310d6d594823d0ed491fa8bdbd99dec4932 for the +standard block cursor. + +BUG: 402589 + +Test Plan: +- Switch cursor shape to "I-Beam" or "Underline" in the "Advanced" +profile settings + +The cursors are a single line again now, before they were blurred by +anti-aliasing. + +Screenshots: +Before: +{F6656366} +{F6656370} + +After: +{F6656371} +{F6656373} + +Also, there are no more artifacts when the cursor is moved or +cursor blinking is enabled. + +Reviewers: #konsole, hindenburg + +Reviewed By: #konsole, hindenburg + +Subscribers: hindenburg, konsole-devel + +Tags: #konsole + +Differential Revision: https://phabricator.kde.org/D19513 +--- + src/TerminalDisplay.cpp | 18 ++++++++++-------- + 1 file changed, 10 insertions(+), 8 deletions(-) + +diff --git a/src/TerminalDisplay.cpp b/src/TerminalDisplay.cpp +index 543b897..397422c 100644 +--- a/src/TerminalDisplay.cpp ++++ b/src/TerminalDisplay.cpp +@@ -716,16 +716,18 @@ void TerminalDisplay::drawCursor(QPainter& painter, + } + } + } else if (_cursorShape == Enum::UnderlineCursor) { +- painter.drawLine(cursorRect.left(), +- cursorRect.bottom(), +- cursorRect.right(), +- cursorRect.bottom()); ++ QLineF line(cursorRect.left() + 0.5, ++ cursorRect.bottom() - 0.5, ++ cursorRect.right() - 0.5, ++ cursorRect.bottom() - 0.5); ++ painter.drawLine(line); + + } else if (_cursorShape == Enum::IBeamCursor) { +- painter.drawLine(cursorRect.left(), +- cursorRect.top(), +- cursorRect.left(), +- cursorRect.bottom()); ++ QLineF line(cursorRect.left() + 0.5, ++ cursorRect.top() + 0.5, ++ cursorRect.left() + 0.5, ++ cursorRect.bottom() - 0.5); ++ painter.drawLine(line); + } + } + +-- +cgit v1.1 diff --git a/kde-apps/konsole/konsole-18.12.3.ebuild b/kde-apps/konsole/konsole-18.12.3.ebuild index 69ba89156da..65dd4d2ac6c 100644 --- a/kde-apps/konsole/konsole-18.12.3.ebuild +++ b/kde-apps/konsole/konsole-18.12.3.ebuild @@ -55,3 +55,5 @@ src_configure() { kde5_src_configure } + +PATCHES=( "${FILESDIR}/${P}-cursor.patch" ) # bug 673766 |
