Tuesday, May 29, 2007

KWin effects config & another video

During the last days I've been working on making KWin's effects configurable from a KConfig module. Until now, if you wanted to enable/disable an effect, your only possibility was using DBus. DBus support is still there of course, but now you can alternatively use KPluginSelector widget (which got a nice makeover thanks to Rafael Fernandez Lopez aka ereslibre) which shows up among other KWin config modules when you RMB on window title and choose "Configure Window Behaviour".
Internally, KWin effects are now services, so we use ksycoca to get a list of them as well as find out in which library a given effect is. This made the code tiny bit simpler and might also result in some performance improvement.

Additionally, effects can now have their own config modules as well, so you can fine-tune them to your personal preference. ATM only two effects (shadow and presentwindows) are configurable, but more will certainly follow.

I wanted to make a video of config possibilites, but it evolved into a much longer video which briefly shows you how to enable compositing and how to choose and configure effects. It also shows some of the (IMHO) more important effects. The 6-minute video can be found at YouTube.
Update: there's also 16mb .avi with slightly better quality, but it's server could be slower than YouTube.

Finally, it looks like I've been added to Planet KDE :-)
If you're interested in more KWin stuff, you might want to check out my previous post as well.

22 comments:

Anonymous said...

can you please post the file on a fast mirror please ?

Wesley said...

Site seems to be down too.. :(

Troy Unrau said...

You know, I have the KWin dot article coming out tomorrow :) I'll be sure to mention this video in the comments, since it missed the cut for the actual text....

Cheers man.

Francis said...

Let me know if you need hosting for the file; just drop me an email at francis at giannaros {dot} org

Rivo Laks said...

The site hosting the file went down quickly indeed, so for now there's just YouTube link. I'll put the direct link back once the hosting problems have been solved.

Troy: great! Looks like I made it just in time then :-)

Anonymous said...

*Wow* - neat technology (especially considering how young kwin_composite is), and a really cute presentation. Nice work!

Anonymous said...

simply awasome!!!

Anonymous said...

Congratulations, great work, it looks amazing!

Can I ask you some questions about kwin?

1- There is no Cube plugin? Do you plan to add one or don't like the concept?

2- Is possible to have the bottom of a window semi-transparent, with some sort of blur effect? I think Vista have something like that, but I'm not sure...

4- What kind of hardware will be needed to run all that effects (at 60 fps)?

Thanks.

Rivo Laks said...

1. yeah, there's no cube, but there's DesktopGrid which offers better usability. I might add cube one day, but it's really low-priority to me. I'd rather work on something which isn't just pure eyecandy, but offers some other advatage(s) as well.

2. There is blur plugin which blurs background of transparent windows. But it's window decoration's responsibility to make part of a window (e.g. titlebar) transparent. I don't know if anyone's working on such window decorations.

4. (where's 3? ;-)) I have GeForce 6600GT and they're mostly smooth for me. When a previously hidden window becomes visible (e.g. when switching desktops) it gets jerky for a moment, but hopefully we can improve that. I think GeForce FX/Radeon 9000 and better should work quite fine (and maybe even lower than that).

Anonymous said...

Hi Rivo,
first thanks for all.
I have an error when I try to launch kwin with compositing enabled:

kwin: Couldn't find framebuffer configuration for default depth!
kwin: /opt/kde4/kdebase/workspace/
kwin/scene_opengl.cpp:124: KWin::SceneOpenGL::Scene
OpenGL(KWin::Workspace*): Asserzione `false' fallita.

I using free driver for my radeon 9200 and I have tried with aixgl and exa enabled or disabled

Vincenzo

wmhilton said...

AWESOME!!! I knew that sticking with KWin was the right idea. (Beryl didn't like KDE so much.) I really like the Desktop Grid effect - it looks much more usable than the Compiz Cube, which can get confusing. I also like that the PresentWindows effect presents windows in a grid. Grids are easy to navigate with your eyes.

(I posted the bit above on the YouTube video also, but wanted to add more without worrying about Youtube's character limit.)

I'd like to say that neither Compiz nor the PresentWindows algorithm appear to take advantage of an important visual cue: window size. When a small calculator application appears as large as a maximized window, that causes some disorientation. Windows Vista's window switcher, despite being made fun of, manages to maintain relative window sizes, which is nice. An interesting compromise would be to arrange windows in a grid based on size!!! I'm thinking "smallest to largest" would be handier than "largest to smallest", because maximized windows usually already have your attention, but smaller windows tend to get lost more easily and would benefit most from the PresentWindows effect. Any chance you could implement that?

Anonymous said...

Nice video - some comments:

- In the accessibility actions, please make sure that marking inactive windows is different from marking not-responding windows. Beryl/Compiz use greying out to show windows which do not respond...
- The Alt-Tab preview: does it feature live preview of the windows? Like videos or active konsoles compiling some stuff? Not that this is necessary, but it looks cool.
- The task bar preview should be larger - previews as small as the taskbar entry do not make much sense. A sane amount of space would be a certain percentage of the current resolution, like 10% or 15%.
- And yes, I would also love to have the cube. The grid is much better accessibility wise, but a "cube" (it is not a cube anymore if it has five or even more faces) would just be a "Wow" factor :D

I'm really looking forward to the ongoing development of kwin_composite. And yes, now it is really about time to get a cool name ;)

Anonymous said...

Wow.

That is very impressive. Beryl/Compiz are neat, but the effects they implemented never really grabbed me. I know I would get tired of them very quickly. Your effects on the other hand all look amazing, and useful! KDE for the win!

Rivo Laks said...

kwilliam: it would be nice to have, but it's not a priority for me. That said, patches are always welcome ;-)

liquidat: yes, something different will be done with non-responding windows.
All previews are live, including e.g. taskbar ones.
The taskbar ones should indeed be larger, but they'll probably be reworked anyway. Idea is that tasbar app itself would tell KWin to render the thumbnail at specific pos with specific size.

Anonymous said...

Just to echo everyone else, this is very cool.

Actually, the thing that really stands out for me is the videorecord tool right there in kde - as I watched the video I wondered how you were drawing the arrows etc.

Thanks very much to you (and Lubos and whoever else has worked on all this)

Anonymous said...

Hy.
About the taskbar preview:
What about just showing the matching window on top, whith, perhaps, somme litle effect showing it's not active on top, but that if you clikc right where you are, your screen will be like it's now ?

Of course, the new configuration thing would have something to do for that, as I can understand not everybody would love it ^^

Anonymous said...

I can see myself having far too much fun with that red marker... ;)

if I use ctrl-tab to switch windows, will I get a smooth transition? one thing I liked about the cube was that window-switching was much easier on my eyes.

Anonymous said...

Seems my comments wasn't posted? Strange.
Just have to write it again I guess. I wrote how impressed I was by kwin_composite, but to keep it short this time I'll just post the comments:

1. I agree with kwilliam about the size of the windows.

2. PresentWindows and DesktopGrid are both pretty neat. However, is there a chance to use something that Kompose has: show the desktops in a grid, and the windows on the desktops in a PresentWindows way. This should allow drag'n'drop too of course.

3. Mouse trail. Useful if you're recording a video, but otherwise just a toy?
I think not. Would it be possible to use it with mouse gestures - the mouse pointer leaves a trail when you're drawing a gesture.

4. Almost forgot. I hope the "More options" settings will be applied immediately - otherwise you sometimes have to "make a guess" (for example when configuring shadows), click OK, click More Options to change the settings and so forth.

Rivo Laks said...

anonymous: as a config option, showing the matching window on top when it's taskbar entry is hovered might make sense indeed.

chani: by ctrl-tab you mean switching between desktops? You'd then get a transition indeed, the DesktopGrid effect smoothly slides to the next desktop. But it's quite fast and so it's not really visible in the video.

lans:
3: that's a good idea, but I'm not sure if it should/can be done by KWin or the application. I'll have to check with Lubos.
4: no, those options are not applied immediately, and I'm not sure if it's a good idea. It would also make code more difficult, because you e.g. need to save the initial values in case the user clicks Cancel. But adding an Apply button there would probably be nice and give pretty much the same effect.

wmhilton said...

@ Simon:
Oh yeah! I completely forgot about the video record tool. That's great! Does it require anything else to be installed? I like the idea of having a screen capture tool in KDE by default. It would make it a lot easier for people to make screencasts showing off KDE4's new features. :-D
Also, is the anotation tool separate or part of the recording tool? I can see where using the mouse to draw on the screen could be handy for still screenshots as well, or even during presentations.

@ Rivo:
I also really like the taskbar idea proposed by the most recent anonymous.

Another whole hearted applause for the awesome job you and the rest of the KDE team does!

Rivo Laks said...

kwilliam, simon: the videorecord effect requires Captury, instructions on how to install it can be found in kdebase/workspace/kwin/effects/videorecord.cpp

The annotation effect (MouseMark) is separate though, so it can be used even when video recording isn't available.

KAUR said...

It's so cool to see an Estonian developer working on such a great thing. I really hoped that there would be a Beryl-like thing implemented in KWin, because it will make KDE and it's apps look really good. :) It's looking great already.

Edu! ;)