RSS and Planet readers: This article contains multiple embedded HD videos, to view them as intended please click here.
A lot has happened in trunk since the release of KDE 4.1 in July. With 4.2 final just a little over one month away, now is the perfect time to look back and see if we have achieved our goals. I would like to try and start something here by writing an overview of what has happened in KWin over these past six months, if the developers of all the other KDE sub-teams also write one for their own projects we can have a nice little series produced.
The main focus of KWin for 4.2 was, without a doubt, desktop effects. Lubos concentrated on card detection, automatic enabling if the system supports it and general optimizations of the core while Martin and myself focused almost entirely on the effects themselves. This does not mean that we didn't do any bug fixing on non-compositing features however, that is just a given. I'll outline all those little changes in a little while but for now lets get into the meaty bit: The effects.
Present windows
For those who don't know present windows is my favourite effect that's available in KWin, whether this is because I've spent the most time on it compared to the rest of KWin or just because it's the most useful and versatile I don't really know. Introduced in KDE 4.2 is the ability to display the windows in different layouts--no longer are you confined to a grid. With the default settings the effect attempts to determine the best location of the windows without excessive scaling, this means that the windows will use up as much of your screen as possible.
Present windows is also the first--and currently, only--effect that takes advantage of the new KWin motion dynamics API. What used to take several hundred lines of code spread throughout the entire effect can now be done in ten, not only that but the results look better, run smoother, and are less likely to be bugged.
These HD videos really like to chew up your bandwidth, if you have internet quotas and are weary of your downloads I have provided links to lower quality versions. Just take note that you will not be able to read the UI text like in the HD version allows.
Oh, and mind the video glitches. Those are the product of the desktop recording software that I used and does not occur in normal usage. For those who are interested: These were recorded at 1280x720 on a nVidia 7800GT running the 177.82 drivers. I've never gotten less than 50fps on this system even when running at my full 3600x1200 resolution.
Desktop cube
Martin's pride and joy: The cube (And cylinder, and sphere). Although I cannot think of a distribution that hasn't backported this, the cube is actually officially a KDE 4.2 feature. There's not really much to say about it other than that it's a cube that you can spin around aimlessly and that it has your desktop on the sides. As pretty much everyone that has looked in the general direction of Linux desktop environments know about it lets just drop into the video. I had intended to also record the cylinder and sphere but forgot that I can't change my KWin effect settings while recording so only the cube is shown.
Snow
With special thanks to Torgny Johansson the KWin snow effect is actually half-decent now by introducing some random speed and direction code. Martin also did some work on the effect's implementation so now it offloads all the CPU work to the graphics card if it supports it, this means that everything is smoother and allows you to display more flakes at once (I upped the number of flakes in the video below to 1,000, with four desktops being displayed on the cube that's 4,000 flakes and it still used almost no CPU time and my framerate didn't even budge). Martin also added the "snow behind windows" setting that allows you to actually see what you're doing when the effect is enabled--it looks quite nice as an animated wallpaper, especially with Nuno's new Air wallpaper that will be the default in KDE 4.2.
Desktop grid
Multi-monitor support, aspect ratio of the desktops are kept when zoomed out, customizable borders between desktops, ability to display desktop names and smoother animations, oh boy did the desktop grid get a massive work over. This was the first effect I ever worked on when I joined the KWin team and so it has its own little spot in my heart.
Invert
The video below is absolutely, positively, 100% (Okay, maybe just 75%) corrupted but you get the general idea. Instead of being forced to invert the entire screen at once you now also have the ability to only invert specific windows. Not much else to say so lets get straight to the video:
Box switch
Only a couple of minor additions: An "animation mode", the ability to change the background window opacity and the ability to not elevate the highlighted window. Once again not much to say, a video is worth a thousands words (a second):
Cover switch
Martin did a complete overhaul on this just like what I did to present windows and the desktop grid--everything is smoother, nicer and more configurable. Two new features include the ability to use the mouse to click on the window you want to select and the ability to display a thumbnail bar at the top of the screen. I don't really know how the thumbnail bar works as I've never used it (Did I say I love present windows?) but apparently when you have lots of windows displayed the thumbnail bar makes it easier to navigate.
Due to a video corruption everything after the 36 second mark was cut off. All new features were already shown before then though.
Magic lamp
The popular OS X minimize animation is now available for KDE! Yet again not much to say, the video below has a minor glitch half-way through but at least it does allow you to see how the effect works a little better.
Everything else
As I mentioned right at the start, effects wasn't the only thing to be improved in KWin 4.2. As there is just too much to list in detail I'll do my normal trick and display them in a small, precise bullet list:
- Added the center window snap zone, now you can snap your windows to the middle of the screen with ease.
- You can now also snap to window corners. Finally!
- Ability to move maximized windows between monitors without having to restore them first.
- The blur effect now blurs less on more translucent windows, can now be used with the fade effect without any glitches (Note to distribution packagers: Never enable blur by default, it's still unstable on some systems).
- Taskbar thumbnails now work again in Plasma.
- Piles of optimizations to KWin core: Less idle CPU usage, higher framerates, less wasted resources, etc.
- If you don't like KWin and want to use Compiz instead the default window manager GUI has been moved to System Settings -> Default Applications.
- Remove conflicts with fullscreen games by unredirecting them, that is, KWin temporarily disables desktop effects on them.
- Various changes to the KWin effect GUI: Common effects can be selected from combo boxes and active screen edges now have their own custom widget to ease customization.
- Added a setting to globally change the speed of all effects at once.
- Added advanced settings to the wobbly window effect configuration dialog.
- Also changed the maths in wobbly windows a bit, the effect looks nicer and windows no longer wobble excessively when resized.
- Added support to custom decoration shadows. Oxygen takes advantage of this by making the active window glow.
- "Kephalized" everything, that is, improved support of multi-monitor systems. I don't really know if this has been taken advantage of yet though as multi-monitor has always worked for me.
- Last but not least: For those who can't run KWin with the default settings for some reason try running with the new KWIN_DIRECT_GL environment variable. There isn't a GUI option for this because it actually changes the way KWin loads, even before the configuration files are read. Example usage:
KWIN_DIRECT_GL=1 kwin --replace &
That's it from me. Here's to hoping that there will be more "From 4.1 to 4.2" articles written by the members of other KDE sub-teams in the near future (I'm looking at you Aaron). ;-)