[KScreen Helper Effect] Avoid windows and desktop shining through
AbandonedPublic

Authored by broulik on Jan 8 2017, 5:52 PM.

Details

Reviewers
None
Group Reviewers
KWin
Summary

The idea behind the effect is to fade the screen to black by fading out all windows. The problem is that when multiple windows are ontop of each other you can see windows shining through. By instead fading brightness to zero we properly fade to black. However, if a window has alpha (such as the panel) it will only fade to black its masked contents, not the entire window, looking bad.

Test Plan

I can no longer briefly see my desktop when suspending and resuming while the screen is locked

Diff Detail

Repository
R108 KWin
Lint
Lint Skipped
Unit
Unit Tests Skipped
broulik updated this revision to Diff 9871.Jan 8 2017, 5:52 PM
broulik retitled this revision from to [KScreen Helper Effect] Avoid windows and desktop shining through.
broulik updated this object.
broulik edited the test plan for this revision. (Show Details)
broulik added a reviewer: KWin.
broulik set the repository for this revision to R108 KWin.
Restricted Application added a project: KWin. · View Herald TranscriptJan 8 2017, 5:52 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript

Wouldn't it make more sense to leave the windows alone and trail the screen paint with a black rectangle, in doubt by adding a black window?

Of course. Could you point me to what this would look like?

I'm no longer sufficiently in touch with the code, but one could probably "abuse" the (unstyled) effectframe for the matter (ie. generalize it and make the current frame a special case reg. color, roundness and opacity) - or introduce a similar class for such purposes.

Or maybe rethink the whole story. We could adjust the gamma of the output to fade to black and don't use the compositor for it at all.

I'd also like to be able to influence the duration of fading, so I can for instance slowly fade over a period of 5 or 10 seconds in PowerDevil until I turn the screen off. If I could do that directly from PowerDevil (set gamma through xcb? plus some Wayland protocol) that would help me a lot.

xcb_randr, gamma ramps. yes.
Look at the inversion implementation in kwin and/or simply the xgamma/xcalib code =)

broulik abandoned this revision.Jan 8 2017, 7:31 PM

Thanks for your input, let's come up with something proper™ for 5.10 then :)