Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/kde:master commit in: kde-apps/konsole/files/, kde-apps/konsole/
Date: Wed, 06 Mar 2019 14:35:32
Message-Id: 1551882752.42accedeeb919a0aeb10f67d4cbde001b8fee38f.asturm@gentoo
1 commit: 42accedeeb919a0aeb10f67d4cbde001b8fee38f
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Wed Mar 6 14:32:32 2019 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Wed Mar 6 14:32:32 2019 +0000
6 URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=42accede
7
8 kde-apps/konsole: Fix disappearing/non-moving cursor
9
10 KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=402589
11 Bug: https://bugs.gentoo.org/673766
12 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
13 Package-Manager: Portage-2.3.51, Repoman-2.3.11
14
15 .../konsole/files/konsole-18.12.3-cursor.patch | 84 ++++++++++++++++++++++
16 kde-apps/konsole/konsole-18.12.3.ebuild | 2 +
17 2 files changed, 86 insertions(+)
18
19 diff --git a/kde-apps/konsole/files/konsole-18.12.3-cursor.patch b/kde-apps/konsole/files/konsole-18.12.3-cursor.patch
20 new file mode 100644
21 index 0000000000..f9960340b9
22 --- /dev/null
23 +++ b/kde-apps/konsole/files/konsole-18.12.3-cursor.patch
24 @@ -0,0 +1,84 @@
25 +From eccfb1f62bbf67ebffee11e241bd05757b826ff1 Mon Sep 17 00:00:00 2001
26 +From: Wolfgang Bauer <wbauer@×××.at>
27 +Date: Mon, 4 Mar 2019 09:59:45 -0500
28 +Subject: Fix ibeam and underline cursor rendering
29 +
30 +Summary:
31 +Since anti-aliasing was enabled in the painter, coordinates need to
32 +be shifted half a pixel so that they align with the pixel grid,
33 +otherwise the result gets "blurred" due to the anti-aliasing.
34 +And as parts of the blurred shape leak outside the cursor rectangle,
35 +this also leaves artifacts when the cursor moves or blinks as these
36 +parts are not cleared.
37 +
38 +This is basically the same as commit
39 +e7085310d6d594823d0ed491fa8bdbd99dec4932 for the
40 +standard block cursor.
41 +
42 +BUG: 402589
43 +
44 +Test Plan:
45 +- Switch cursor shape to "I-Beam" or "Underline" in the "Advanced"
46 +profile settings
47 +
48 +The cursors are a single line again now, before they were blurred by
49 +anti-aliasing.
50 +
51 +Screenshots:
52 +Before:
53 +{F6656366}
54 +{F6656370}
55 +
56 +After:
57 +{F6656371}
58 +{F6656373}
59 +
60 +Also, there are no more artifacts when the cursor is moved or
61 +cursor blinking is enabled.
62 +
63 +Reviewers: #konsole, hindenburg
64 +
65 +Reviewed By: #konsole, hindenburg
66 +
67 +Subscribers: hindenburg, konsole-devel
68 +
69 +Tags: #konsole
70 +
71 +Differential Revision: https://phabricator.kde.org/D19513
72 +---
73 + src/TerminalDisplay.cpp | 18 ++++++++++--------
74 + 1 file changed, 10 insertions(+), 8 deletions(-)
75 +
76 +diff --git a/src/TerminalDisplay.cpp b/src/TerminalDisplay.cpp
77 +index 543b897..397422c 100644
78 +--- a/src/TerminalDisplay.cpp
79 ++++ b/src/TerminalDisplay.cpp
80 +@@ -716,16 +716,18 @@ void TerminalDisplay::drawCursor(QPainter& painter,
81 + }
82 + }
83 + } else if (_cursorShape == Enum::UnderlineCursor) {
84 +- painter.drawLine(cursorRect.left(),
85 +- cursorRect.bottom(),
86 +- cursorRect.right(),
87 +- cursorRect.bottom());
88 ++ QLineF line(cursorRect.left() + 0.5,
89 ++ cursorRect.bottom() - 0.5,
90 ++ cursorRect.right() - 0.5,
91 ++ cursorRect.bottom() - 0.5);
92 ++ painter.drawLine(line);
93 +
94 + } else if (_cursorShape == Enum::IBeamCursor) {
95 +- painter.drawLine(cursorRect.left(),
96 +- cursorRect.top(),
97 +- cursorRect.left(),
98 +- cursorRect.bottom());
99 ++ QLineF line(cursorRect.left() + 0.5,
100 ++ cursorRect.top() + 0.5,
101 ++ cursorRect.left() + 0.5,
102 ++ cursorRect.bottom() - 0.5);
103 ++ painter.drawLine(line);
104 + }
105 + }
106 +
107 +--
108 +cgit v1.1
109
110 diff --git a/kde-apps/konsole/konsole-18.12.3.ebuild b/kde-apps/konsole/konsole-18.12.3.ebuild
111 index 69ba89156d..65dd4d2ac6 100644
112 --- a/kde-apps/konsole/konsole-18.12.3.ebuild
113 +++ b/kde-apps/konsole/konsole-18.12.3.ebuild
114 @@ -55,3 +55,5 @@ src_configure() {
115
116 kde5_src_configure
117 }
118 +
119 +PATCHES=( "${FILESDIR}/${P}-cursor.patch" ) # bug 673766