Bug 462914 - glitched horizontal lines in text selection @ 150% scale on X11
Summary: glitched horizontal lines in text selection @ 150% scale on X11
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
: 453519 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-12-11 16:16 UTC by ratijas
Modified: 2023-03-03 09:13 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Konsole @ 150% (67.94 KB, image/png)
2022-12-11 16:16 UTC, ratijas
Details
Gitching dialog (91.79 KB, video/mp4)
2022-12-12 08:49 UTC, Krzysztof Kundzicz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ratijas 2022-12-11 16:16:58 UTC
Created attachment 154501 [details]
Konsole @ 150%

SUMMARY

Look at the screenshot: glitched lines appear when slowly dragging mouse for text selection at 150% global scale on X11.

STEPS TO REPRODUCE
0. Set Global Scale to 150% in System Settings -> Display Configuration, and reboot.
1. Open Konsole
2. Drag mouse with different speed to select text

OBSERVED RESULT
When dragging slowly enough, glitched horizontal lines appear between lines of text.

EXPECTED RESULT
Selection regions should be solid without gaps.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: git-master
Qt Version: 5.15.7
Kernel Version: 6.0.11-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-8565U CPU @ 1.80GHz
Memory: 15.3 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 620
Manufacturer: LENOVO
Product Name: 20QD003CRT
System Version: ThinkPad X1 Carbon 7th
Comment 1 Krzysztof Kundzicz 2022-12-12 08:49:55 UTC
Created attachment 154525 [details]
Gitching dialog

/me too, but also all ncurses-drawing apps are glitching out: every updated/redrawn line is becoming misaligned, especially visible on solid backgrounds.

It all stared after kde-gear update to the 22.12 version.

Attached an example with simple one-liner showing this glitching in `dialog`  program (other ncurses apps show the same behaviour).

```
for i in `seq 0 10 100`; do echo ${i} | dialog --gauge "Glitching progress..." 10 60 ; sleep 0.5; done
```

I also have scaling enabled:
```
kk@kk ~ $ printenv | grep SCALE
QT_SCREEN_SCALE_FACTORS=DP-0=1.25;DP-1=1.25;HDMI-0=1.25;DP-2=1.25;
QT_AUTO_SCREEN_SCALE_FACTOR=0
kk@kk ~ $ 
```

After disabling the scaling, the glitching stops.

This new, fancy word-mode is disabled. 
X11, proprietary nvidia drivers.
Comment 2 Bug Janitor Service 2022-12-20 23:08:50 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/konsole/-/merge_requests/790
Comment 3 Kurt Hindenburg 2022-12-30 18:04:34 UTC
Git commit 35c5bc11094e56aece691ef574fe93456beab96d by Kurt Hindenburg, on behalf of Luis Javier Merino Morán.
Committed on 30/12/2022 at 16:49.
Pushed by hindenburg into branch 'release/22.12'.

Fractional scaling and Antialias don't mix well

This is bug #373232 again.  The rendering rewrite in 76f879cd7 reenabled
antialasing in a too wide context, causing the bug to reappear.

After #373232, the situation was that QPainter::TextAntialiasing instead
of QPainter::Antialiasing would be enabled depending on the "Smooth
fonts" setting, and QPainter::Antialiasing would be enabled depending on
that same setting just for TerminalPainter::drawLineCharString().  Go
back to that situation.

M  +3    -1    src/terminalDisplay/TerminalPainter.cpp

https://invent.kde.org/utilities/konsole/commit/35c5bc11094e56aece691ef574fe93456beab96d
Comment 4 Matan Ziv-Av 2023-01-06 19:24:24 UTC
Git commit 56a02a17edabea90d5d6e2c692a0b836fc24b2ee by Matan Ziv-Av, on behalf of Luis Javier Merino Morán.
Committed on 06/01/2023 at 19:16.
Pushed by matan into branch 'master'.

Fractional scaling and Antialias don't mix well

This is bug #373232 again.  The rendering rewrite in 76f879cd7 reenabled
antialasing in a too wide context, causing the bug to reappear.

After #373232, the situation was that QPainter::TextAntialiasing instead
of QPainter::Antialiasing would be enabled depending on the "Smooth
fonts" setting, and QPainter::Antialiasing would be enabled depending on
that same setting just for TerminalPainter::drawLineCharString().  Go
back to that situation.

M  +3    -2    src/terminalDisplay/TerminalPainter.cpp

https://invent.kde.org/utilities/konsole/commit/56a02a17edabea90d5d6e2c692a0b836fc24b2ee
Comment 5 ninjalj 2023-01-21 23:18:58 UTC
*** Bug 453519 has been marked as a duplicate of this bug. ***
Comment 6 ray 2023-02-16 07:17:11 UTC
It's marked as resolved but after two KDE Frameworks updates in KDE Neon distro it's still present in terminal. It's just only on git? Is any date when it will be released in next final Frameworks?
Comment 7 ratijas 2023-02-16 15:05:22 UTC
> It's marked as resolved but after two KDE Frameworks updates in KDE Neon distro it's still present in terminal. It's just only on git? Is any date when it will be released in next final Frameworks?

This does not have anything to do with Frameworks and their release cycle. It's been fixed in Konsole itself, which is due to release with other KDE Gears apps.

https://community.kde.org/Schedules/KDE_Gear_22.12_Schedule
Comment 8 nkwkelvin 2023-03-02 01:05:30 UTC
Which version will include the fix? I am still facing this bug on 22.12.2.
Comment 9 Krzysztof Kundzicz 2023-03-03 09:13:44 UTC
(In reply to nkwkelvin from comment #8)
> Which version will include the fix? I am still facing this bug on 22.12.2.

Supposedly it should've been fixed since 22.12.1 - https://kde.org/announcements/changelogs/gear/22.12.1/ :

```
[...]
▶ konsole
[...]
    Fractional scaling and Antialias don't mix well. Commit. Fixes bug #462914
[...]
```

But in 22.12.3 IT IS STILL BROKEN, exactly as reported, nothing has changed.