Bug 402589 - Text cursor disappears or doesn't move
Summary: Text cursor disappears or doesn't move
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: kpart (show other bugs)
Version: 18.12.1
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
: 404873 404973 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-12-26 18:38 UTC by Nikos Chantziaras
Modified: 2019-03-07 01:35 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In: 19.04.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nikos Chantziaras 2018-12-26 18:38:51 UTC
SUMMARY
Commit e7085310d6d594823d0ed491fa8bdbd99dec4932 (fix cursor when anti aliasing is enabled) breaks the text cursor. It either gets stuck and doesn't move, or it disappears completely. Video showing the issue:

https://youtu.be/0vGjH0A0vds

Reverting the offending commit fixed the issue.


STEPS TO REPRODUCE
1. In the profile settings, go to the "Advanced" tab and enable "blinking cursor" and "cursor shape" to "underline".


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Gentoo Linux AMD64
KDE Plasma Version: 5.14.4
KDE Frameworks Version: 5.53.0
Qt Version: 5.11.3
Comment 1 Kurt Hindenburg 2018-12-27 15:07:10 UTC
Thanks - Martin can you look at this?
Comment 2 Nate Graham 2019-03-02 20:57:25 UTC
*** Bug 404973 has been marked as a duplicate of this bug. ***
Comment 3 Nikos Chantziaras 2019-03-03 12:26:29 UTC
If you have problems reproducing, try using a bitmap font.
Comment 4 Wolfgang Bauer 2019-03-04 12:58:22 UTC
*** Bug 404873 has been marked as a duplicate of this bug. ***
Comment 5 Wolfgang Bauer 2019-03-04 14:11:28 UTC
This fixes it for me:
https://phabricator.kde.org/D19513
Comment 6 Nikos Chantziaras 2019-03-04 14:25:51 UTC
(In reply to Wolfgang Bauer from comment #5)
> This fixes it for me:
> https://phabricator.kde.org/D19513

Same here. Applied to 18.12.2 and it fixes the issue.
Comment 7 Kurt Hindenburg 2019-03-05 14:37:49 UTC
Git commit eccfb1f62bbf67ebffee11e241bd05757b826ff1 by Kurt Hindenburg, on behalf of Wolfgang Bauer.
Committed on 05/03/2019 at 14:37.
Pushed by hindenburg into branch 'master'.

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.

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

M  +10   -8    src/TerminalDisplay.cpp

https://commits.kde.org/konsole/eccfb1f62bbf67ebffee11e241bd05757b826ff1
Comment 8 Kurt Hindenburg 2019-03-07 01:35:26 UTC
Git commit 9af659c73e3203e1d5ef3873fa6c0144258b9673 by Kurt Hindenburg, on behalf of Wolfgang Bauer.
Committed on 07/03/2019 at 01:32.
Pushed by hindenburg into branch 'Applications/18.12'.

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.

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

(cherry picked from commit eccfb1f62bbf67ebffee11e241bd05757b826ff1)

M  +10   -8    src/TerminalDisplay.cpp

https://commits.kde.org/konsole/9af659c73e3203e1d5ef3873fa6c0144258b9673