[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwin
Subject:    Re: Dim screen effect when KDE-su is activated
From:       Rivo Laks <rivolaks () hot ! ee>
Date:       2008-03-02 22:26:45
Message-ID: 200803030026.45755.rivolaks () hot ! ee
[Download RAW message or body]

Hi again, sorry for the long delay.

Ühel kenal päeval (neljapäev, 21. veebruar 2008) kirjutas Martin Graesslin:
> Am Donnerstag, 21. Februar 2008 schrieb Rivo Laks:
> > First, the dim is way too strong. You draw an 80% opaque rectangle which
> > means that the original screen contents will be only 20% visible. It
> > should be vice versa, i.e. draw a 20% opaque or so rectangle instead.
>
> OK, I changed it to 20 %. And it shows me again that I have to buy a new
> monitor as my one is much too bright with too bad contrast :-( (I did the
> typical German mistake: bought computer hardware at a discounter)

Ouch. Well 20% is quite bright here as well, so I wouldn't mind if you made it 
a bit darker, just not too dark (up to 40% might be fine).

> > There could also be a nice animation when the effect is (de)activated
> > though this can be done later :-)
>
> As I wanted to add animation anyway, I just added one. The screen is dimmed
> from top to bottom. There are probably many other ways how the animation
> could be implemented - any better ideas?

To be honest it's a bit too intrusive for my taste. I don't like the sharp 
edge running over my screen :-)
I'd go for either a simple fade in/out animation or if you want something 
fancier then maybe top-to-bottom with gradient edge, like Kubuntu logout 
screen's effect.
But it's not a showstopper by any means, just something I'd like to see 
changed before 4.1.

> > I'm also not sure about clipping. You don't clip the active window nor
> > the translucent rectangle. It doesn't seem to do any harm currently but
> > it still doesn't feel right :-)
> > You might want to wait for Lubos' comments and his PaintClipper class
> > with this.
>
> Actually I have no idea of clipping at all - so I have to wait and have to
> look at Lubos' PaintClipper :-)

AFAIU you should use  PaintClipper::Iterator (see apidox for details) to 
iterate over all rects that belong to the clipping region and draw one quad 
for each rect instead of one big quad over the entire screen.

The easier way however might be using one of   renderGLGeometry()   functions 
to render your quad. In that case you render a single quad like ATM and 
renderGLGeometry() takes care of the clipping itself. The only difference 
with your current code is that you have to put your vertices into an array 
but that's not difficult :-)

Another small nag point is that I'd change the name for something less 
generic. I'm not sure what exactly, but something like "Dim Screen for 
Administrator Mode" would be better than just "Dim Screen". Maybe the 
filenames should be changed also (dimscreensudo.* ?)... or maybe not, 
dunno ;-)

Overall, I think this effect can go into SVN, the remaining small issues can 
be worked out there.

Rivo
_______________________________________________
Kwin mailing list
Kwin@kde.org
https://mail.kde.org/mailman/listinfo/kwin

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic