Bug 279076 - No blurring behind translucent windows when invert colors is activated
Summary: No blurring behind translucent windows when invert colors is activated
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: effects-various (show other bugs)
Version: 5.13.4
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-01 19:46 UTC by Thomas Mitterfellner
Modified: 2018-10-23 13:53 UTC (History)
2 users (show)

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


Attachments
Screenshot of the issue (264.54 KB, image/png)
2011-08-01 20:11 UTC, Thomas Mitterfellner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Mitterfellner 2011-08-01 19:46:54 UTC
Version:           unspecified (using KDE 4.7.0) 
OS:                Linux

The blurring behind translucent windows like the notification popups doesn't work when the colors of the whole screen are inverted (with the invert colors effect of kwin), making the contents of those windows very hard to read.

Reproducible: Always

Steps to Reproduce:
Invert whole screen with kwin effect
Open some window containing text
Open the device notifier to let it slide over the aforementioned window

Actual Results:  
The text in the window behind the device notifier popup is not blurred but clearly readable.

Expected Results:  
Blurring should work when screen colors are inverted too.
Comment 1 Thomas Mitterfellner 2011-08-01 20:11:31 UTC
Created attachment 62438 [details]
Screenshot of the issue
Comment 2 Thomas Mitterfellner 2011-08-01 20:13:25 UTC
Blurring only does not work when the translucent window has its colors inverted (either by inverting the whole screen, or only the translucent one itself)
Comment 3 Thomas Mitterfellner 2011-08-09 17:03:18 UTC
As a workaround, I now use 'xcalib -a -f' to invert the whole screen (inverts also the color of the stars of the 'Track Mouse' effect, but anyway), and only use kwin for inverting individual windows.
Comment 4 Martin Flöser 2011-09-25 09:21:09 UTC
This is unfortunately to be expected as there can only be one fragment shader in place. I am not sure whether it is worth the time needed to fix this issue.
Comment 5 Thomas Lübking 2013-01-30 13:47:57 UTC
fyi: screen inversion is done preferably via xrandr > xf86vm > shader, so you schould not have to invoke xcalib in this case
Comment 6 Thomas Mitterfellner 2013-01-30 13:58:43 UTC
Thomas, that sounds interesting. Could you tell me how to do that, exactly (what options do I need to pass to xrandr)?
Comment 7 Thomas Lübking 2013-01-30 14:10:25 UTC
nothing, kwin exports that global shortcut independent from the compositor now (look it up in "kcmshell4 keys") and the function behind checks what's available (gamma ramps through xrandr or xf86vm - shader as last resort) and uses that.

Notice that the nvidia blob supports xrandr gamma ramps since the 300.xxx versions, but interim had a couple of issues, esp. with rotated displays.
Latter versions all worked for me, though.
Comment 8 Thomas Mitterfellner 2013-01-30 14:23:41 UTC
OK, thanks for that explanation. So this means that with recent versions of kwin (+ a recent nvidia proprietary driver), a different method for color inversion than the shader method may be used per default, which then would allow for the blurring effect behind translucent windows to be active even with inverted colors?
Which is the minimum kwin I can test this behavior with?
Comment 9 Thomas Lübking 2013-01-30 15:34:08 UTC
Some 4.8 git master, ie. with every 4.9 version.
commit 24a6a569fd08b6308ac0ef240f93d5af32e8332c in particular.

As for nvidia:
i can assure that 313.18 works on a GT520 ;-)

(Also there should no problem reg. this with the regular xorg drivers for eg. intel at all. The nvidia blob is no requirement, but had little issues in their xrandr 1.3 introduction. The former 295.xxx versions would use xf86vm flawlessly)

Notice: this does only cover full screen inversion. Other is not possible via the gamma ramps (but this way doesn't require compositing, not to mention glsl, and is *much* faster)
Comment 10 waddlesplash 2013-04-19 15:38:17 UTC
I too confirm this bug. KDE 4.9.5; NVIDIA 304.88; Kubuntu 12.10 -- all latest stable releases from the (K)Ubuntu repos.
Comment 11 Vlad Zahorodnii 2018-08-25 15:28:26 UTC
(In reply to Martin Flöser from comment #4)
> This is unfortunately to be expected as there can only be one fragment
> shader in place. I am not sure whether it is worth the time needed to fix
> this issue.

I think it's possible to have both screen inversion and blurring. The scene has to be rendered into an off-screen texture, then it can be post processed by the Invert effect.

Not sure if it's possible to implement right now.
Comment 12 Vlad Zahorodnii 2018-08-25 15:29:47 UTC
The only problem it will invert colors globally.
Comment 13 Vlad Zahorodnii 2018-10-23 13:53:15 UTC
Git commit 9fae2f4905d5684f19d79bc2a5f839d9f07d7890 by Vlad Zagorodniy.
Committed on 23/10/2018 at 10:57.
Pushed by vladz into branch 'Plasma/5.14'.

[effects/invert] Don't block blur and background contrast effect

Summary:
Background behind some windows is not blurred because the invert effect
sets PAINT_WINDOW_TRANSFORMED. This essentially "turns off" the blur and
the background contrast effect unless we set the force roles.

Because the invert effect is a "post-processing"(not really) effect we
don't have to set that flag.
Related: bug 359583
FIXED-IN: 5.14.3

Test Plan: {F6341916}

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D16358

M  +0    -13   effects/invert/invert.cpp
M  +7    -2    effects/invert/invert.h

https://commits.kde.org/kwin/9fae2f4905d5684f19d79bc2a5f839d9f07d7890