Bug 400102 - With PLASMA_USE_QT_SCALING=1 plasmashell looks semi-transparent
Summary: With PLASMA_USE_QT_SCALING=1 plasmashell looks semi-transparent
Status: RESOLVED NOT A BUG
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (show other bugs)
Version: 5.14.1
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: David Edmundson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-21 10:41 UTC by Omer Akram
Modified: 2018-11-29 18:15 UTC (History)
1 user (show)

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


Attachments
app launcher blurry (1.57 MB, image/png)
2018-10-21 10:41 UTC, Omer Akram
Details
better quality screenshot (1.39 MB, image/png)
2018-10-21 10:46 UTC, Omer Akram
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Omer Akram 2018-10-21 10:41:48 UTC
Created attachment 115799 [details]
app launcher blurry

SUMMARY
I have non-integer scaling set (1.7) on my Thinkpad X1C 6th Gen. Most of the apps widgets scales nicely but plasmashell itself doesn't, so I export PLASMA_USE_QT_SCALING=1 into the environment and now it looks all funny.


STEPS TO REPRODUCE
1. kill plasmashell
2. start it as PLASMA_USE_QT_SCALING=1 plasmashell
3. Click app launcher in the botton left corner

OBSERVED RESULT
The app launcher looks semi transparent


EXPECTED RESULT
It shouldn't be trasnparent


SOFTWARE VERSIONS
(available in About System)
KDE Plasma Version: 5.13.5
KDE Frameworks Version: 5.50.0
Qt Version: 5.11.1

ADDITIONAL INFORMATION
Apart from the the above described issue, the icons in the bottom panel all become blurry and even the fonts of notifications becomes jagged. (Everything is fine if I set PLASMA_USE_QT_SCALING=0)
Comment 1 Omer Akram 2018-10-21 10:46:48 UTC
Created attachment 115800 [details]
better quality screenshot
Comment 2 Omer Akram 2018-10-21 12:02:29 UTC
I am willing work on this bug if told where to actually look for, I spent the past hour looking inside the shell code to see if I can find a fix/workaround to no avail, but maybe I am looking at the wrong place ?
Comment 3 David Edmundson 2018-10-21 17:36:04 UTC
That's why that env var is not set. Don't set it.

However, for your issue if you want to fix it.

We have to co-ordinate with kwin in global device pixels.
By enabling plasma to use Qt scaling, plasma only knows about logical pixels; with a conversion in Qt.

However, plasma (via kwindowsystem) has some other low level X places that don't go through that conversion. It needs to happen there.
Comment 4 Omer Akram 2018-11-29 18:15:54 UTC
(In reply to David Edmundson from comment #3)
> That's why that env var is not set. Don't set it.
> 
> However, for your issue if you want to fix it.
> 
> We have to co-ordinate with kwin in global device pixels.
> By enabling plasma to use Qt scaling, plasma only knows about logical
> pixels; with a conversion in Qt.
> 
> However, plasma (via kwindowsystem) has some other low level X places that
> don't go through that conversion. It needs to happen there.

I have been trying to make myself familiar with plasma code base since the last two days, I made progress but I still haven't been able to find "the place" where plasma is "coordinates" with KWin.

Do I get it right that the partially transparent background is because KWin does its compositing in different coordinates than what plasma understands ?