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.
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.
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.
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.
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.
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:
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):
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.
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.
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:
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). ;-)
Comments
20th December, 2008Diederik
Wow wow wow! You guys are doing an amzing job, and I really like these 4.1 -> 4.2 blogs :-)
20th December, 2008onety-three
Compiz? Who needs Compiz? :) Great article and amazing work on KWin. I can’t say much more than a big "Thank you!" to you and the rest of the team. (BTW, you have a small typo in there: "snow being windows" should read "snow behind windows", I guess)
20th December, 2008nuno pinheiro
What can I say? Fantastic, amazing work.
20th December, 2008Mark Kretschmann
Could it be that your server system time is off? Somehow you seem to blog from the future.
20th December, 2008Seb Ruiz
Fantastic work, mate! Props to you and all the KWin team.
20th December, 2008Martin
Ever thought about publishing this blog post as a dot story?
20th December, 2008Schnitzel
A M A Z I N G !
20th December, 2008Lucas Murray
Fixed, that’s for picking it up. I usually don’t proof-read my articles before I publish, I guess it’s the "release early; release often" mentality just applied to text. =)
I’ve looked and looked but I can’t seem to find where the fault is. It only occurs to the RSS feed dates, not anywhere else on the site (And all that is handled internally by Django).
20th December, 2008ianjo
Great work from the Kwin team :)
20th December, 2008Linus
GREAT! Really really neat. This is a prime example of why it is worthwile sitting at planetkde :D How about kwin compositing and video? Is the video still "blue" when composited?
20th December, 2008Lure
Great post and good showcase of new functionality. I was never very much interested in compiz/effects madness, but with KDE 4.2 I will give it a try on my Intel-graphics box. Thanks to whole KWin team! And thanks for using HD video—it makes it much more useful than low-res videos others are using.
21st December, 2008Bert Speckels
I love the snow-effect. Obsolutely useless and nice looking :-) What about rain? What about lightning and thunder? No seriously: Why not combine these effects with local weather and display the real weather conditions on the desktop: Quite useless but really cool! Some more ideas: Select a wallpaper which represents the current weather. And if you have that implemented: Make it inversable: Display rainy weather when sunny, the sun when it’s raining or snowing… Some more ideas: Use weather forecast to display the weather of the next day,… Well, I am dreaming. Perhaps there is more important to do *smile*
21st December, 2008DanaKil
Thank you, thank you ! Really great :-)
well, actually the only thing I miss from Compiz is the scrollwheel usage, especially for the Zoom Effect (and for the Cube)
21st December, 2008Lubo Lunák
To my knowledge this problem is caused by X.Org’s DRI, which all drivers use except for nvidia. Videos and OpenGL apps in composited mode work without a problem with the nvidia binary driver (and this driver on average working the best in practice is I guess the reason why KWin is developed primarily using that one—kind of shows some of the ironies of the free desktop). DRI2 is said to fix these problems, whenever the X people get to finally releasing it.
21st December, 2008AndrejT
This is an absolutely fantastic presentation of cool new features in KDE 4.2. I really hope other KDE developers do something similar for their parts of KDE. I’ve been using KDE 4,2 beta 1 and beta 2 ever since they came out and they bring so much great new stuff compared to 4.2 that it would be a big shame if others don’t know about the huge progress. Keep on rocking!
21st December, 2008kanttu
Great work indeed! I have two suggestions for "present windows" effect: a) Make the toggle corner area larger, so instead of trying to hit a pixel at (0,0), also horisontally pixels (0,1), (0,2), (0,3) and vertically pixels (1,0), (2,0) and (3,0) would trigger the effect. So instead of one triggering pixel, there would be seven pixels. b) In "present windows" mode when moving the mouse again to the triggering corner, it should go back to the normal mode selecting previously selected window. This is how it works in OSX and I find it useful to get just an overview of all windows without needing to select anything.
21st December, 2008jramskov
Thanks a lot for that amazing presentation! Very nice work you guys have done! And yes, more of these 4.1 -> 4.2 articles!
21st December, 2008Magnus
That’s an amazing progress. the speed of kwin in kde4.2-beta2 is almost up to par with compiz on my intel integrated gfx card. i did not expect kde 4 to ever run smoothly on my aging celeron laptop, but it actually does! the kde4 policy of not working around bugs and design flaws in basic technology like X drivers or freedesktop protocols (like the dreadful system tray) sure temporarily results in a rather rough user experience, but in the end it seems to be better way to handle things, as it encourages actually fixing those low-level bugs.
21st December, 2008Patrick Spear
Amazing work- KWin is probably my favorite part of KDE4 (along with oxygen). One question, though. Whereas Desktop Grid formerly zoomed out my entire multimonitor setup (into four giant desktops), it now zooms out each monitor individually (breaking each desktop up into pieces). I looked for an option like the one for Cube- "Rotate all desktops together" or something along those lines- to restore the previous functionality, but couldn’t find it. Is this the new behaviour because of Kephalize? Can there be an option for the old behaviour?
21st December, 2008Leo S
Looks awesome! Nice work! The only effect that looks a bit "off" is the genie effect, but I can’t put my finger on why. On OSX it seems a bit more refined.. Bert’s suggestion of weather integrated into your desktop is one i’ve been thinking about for a long time. You can go even farther and integrate the desktop into time. So your window shadows change as the day progresses, and get longer towards the evening.. Then when the sun goes down the background shows stars or something.. Current weather is displayed via desktop effects (rain splatters on the monitor, snow, etc). To do properly would take integration with lots of different components, but I think would look pretty awesome.
21st December, 2008Anonymous Coward
Hello — (sorry to post anonymously, but there is this spam thing…) I am a bit puzzled: wasn’t one of the goals of Plasma to fuze everything into one component? Meaning, in the current case, that KWin would stop existing as a distinct entity and become a Plasma component. But instead, I’m seeing Plasma becoming ‘just’ some some widget platform whilst Kwin is still being worked on, the whole KDE desktop environment staying at the ‘multiple distinct parts’ stage. Did I misunderstand aseigo when he presented Plasma eons ago, or, huh, well, "we’re not just there yet" if I can say so? Not to troll, I am just asking… AC
21st December, 2008kde fanboy
This is really amazing! Thank you very much!
21st December, 2008Tom
Great work! But please call it Kwin, like it was intended in its beginnings. KWin is SUCH A BORING NAME. KBoring. K?
21st December, 2008Peppe Bergqvist
Wow. F—-ing amazing. Too bad I’ve started to work and have to use Windows, cause this goodies are just perfect.
21st December, 2008Jan S.
Thanks for all your work! There’s one little thing that bothers me, though. I really loved the linear scaling of Present Windows, but now it’s doing the compiz-y wobbling. Any way to disable that? Or maybe the part of the code I could comment out without me digging through the codebase alone? Any help would be appreciated :-) Thanks again,
21st December, 2008LS12
Hey man. Thanks for the video’s :) Really awesome work. There is only one thing I would like to see in Kwin. That is, make windows remember there position and size. So when I close Dolphin and open it later, it should open at the same place and with the same size as it was before I closed it. Really, this is the only feature I miss in KDE4. It doesn’t have to be default, just place an option for it somewhere. Again, thanks for the great work.
21st December, 2008Matt Parry
Hi, I use KDE since 3.0.2 and moved to 4.0 as soon as it was released. I saw a lot of negative people, but I have never complained about 4.0 - I see that it was the start of something brilliant. As time has gone by I see how much improved KDE is, and in particular how stable and feature rich Kwin is (currently using 4.2 beta 2). I really think you are fantastic to be working on KDE, and for me present windows is also my favourite / most productive effect—thank you for this. Regards—Matt hay—maybe you could write an article on what your plans are for 4.3 ;-)
21st December, 2008Yves
My congratualations for the beta2 release.it marks a huge step forward from 4.1. I have a question regarding the motion dynamic api. in fact the "present windows" imho is the best looking and the one feeling the most "naturally". will the other effects also be using this api? For 4.2? If not, when then? Imho it’s crucial for the appearance and feeling of the whole desktop… :) congrats for the upcoming 4.2 to all the developers
21st December, 2008quickshade
DRI2 is going to be included in the next Xserver release, which should happen early this year.I know Ubuntu Alpha 2 has it.
21st December, 2008Thomas
Excellent work and great videos! Thanks a lot!
21st December, 2008Francois
Amazing work and thanks for taking the time to post some news about 4.1 -> 4.2. The weather effect that someone suggested is indeed a very nice idea, I think that would be the kind of things that would make people think "hey that’s neat!".
21st December, 2008fish
Great work! I don’t like the cube though. Is there a way to disable the big K? Please, please make this configurable! Thanks!!
21st December, 2008pansz
Any information for shortcut improvement? For me, the only useful feature of compiz-fusion is to be able to use things like Ctrl+MouseScrollWheel as a shortcut. (I use this shortcut to switch between virtual desktops) Will Kwin be able to use the mouse scroll wheel as a shortcut?
22nd December, 2008Lucas Murray
Active screen edges are getting an upgrade in KDE 4.3, I’ll see what I can do.
There is currently a bug that prevents this from happening (Same with shortcuts). I have this as a high priority to fix for KDE 4.3.
No option for the short-term, the way both methods work in code is so different it’s not easy to have both at once. If someone submits a patch though I do not see why it can’t be added to trunk.
Although that’s their goal it’s never going to happen—Applications and X11 will always exist and therefore a window manager is still required.
Wait for KDE 4.3. =)
22nd December, 2008Lucas Murray
There is a very old wish for this on http://bugs.kde.org so it will be added sometime in the future, as for when I do not know. In the meantime feel free to use the Alt+F3 -> Advanced -> Special Window Settings dialog to manually set a position of a window when it is displayed.
My plans for KDE 4.3 have changed so many times that not even I know what I’m doing. Feel free to watch the KWin mailing list and this site to see what’s happening in Wobbly Land.
Whenever we get around to porting them. All new effects should be using the new API though.
Hopefully this will be fixed in KDE 4.3, no promises though as global shortcuts and X11 don’t mix well and require some ugly code to get them to work.
22nd December, 2008kde4.de
Thank you for this great work. The videos are very cool! Looking forward to 4.2 ;-)
22nd December, 2008Michael "Plasma" Howell
> I am a bit puzzled: wasnt one of the goals of Plasma to fuze everything into one component? Meaning, in the current case, that KWin would stop existing as a distinct entity and become a Plasma component. Can you quote that?
22nd December, 2008Martin
This is allready configurable. Just open the cube settings, go to advanced and disable the checkbox "Display image on caps"
22nd December, 2008Rolandixor
this is compiz all over again. get it to work for me on ubuntu (so I can use KDE without all the trouble I get now) and I’ll be happy. Oh, and end the flame war between the compiz/gnom(exciting) and kwin/kd(easy) teams and linux will dominate the desktop! BTW, keep it up, cause the linux desktop needs to look the same in certain ways if it is to advance… next stop, enlightenment…
23rd December, 2008cga
Hey Lucas, i follow the great entusiasm and kudos here. really great and neat work. now, i’m not a coder so i cannot know better than you but i have only on question/suggestion about shorcuts:
i used to use e17 a couple of years ago. they’ve been implementing global shortcuts very nicely and deeply configurable from a main "shortcuts panel" ; they work really smoothly and are very very useful. you might know as much as others that raster is a perfectionist and that if shortcut wouldn’t be feasible respecting a standard he wouldn’t have implemented them. (this happened for the system tray) again, i’m not a coder and i don’t know much about these things but why don’t you "borrow" code if possible???? my 2 cents. — cga you could
23rd December, 2008fotp
which desktop recording software are you using? thanx great videos!
23rd December, 2008fourforces
All the additions look great. Really looking forward to KDE 4.3…
23rd December, 2008Brian
Take this comment for what it’s worth because I bascially no nothing about Linux. I’m not even sure how I got on this page (digg.com, I think). But, come on…what really is the point of all this? To prove that you all can code something similar to what Mac OS X and Vista have? Ah, so what? Why not just run Mac OS X and/or Vista? These videos seem to show that you all have combined the genius of Mac OS X’s Expose with the totally unnecessarily complexity of Windows Control Panel. Built by geeks, for geeks. Is there anyone in the Linux community with an original thought? All I ever see from these are poor implementations of features from other platforms. Take the UI and spin it on it’s head. Think about solving real UI and human-to-computer interaction problems. Basically, build a better mouse trap.
23rd December, 2008Mike
Just curious you say that multi-monitor has always worked for you, as well it has for me, but one thing that drove me mad in 4.1 (kubuntu build if that matters) is that you can’t put any plasma stuff on the second monitor, meaning you can’t put desktop icons on it or extend/move your taskbar to it. Do you know if this situation has improved. It’s the one spot where I think there was a huge step backwards from kde 3.x
23rd December, 2008Josh
Yes, excellent work. I also think more weather effects would be fabulous. How about snow that optionally accumulates, a sun moving across the sky and casting various shadows, rain pooling on the top of windows and then getting shaken off when the windows are moved…. For people stuck in dungeon-like computer labs, it could prevent insanity to have a connection to the "outdoors", even if only a simulated one :-) Congrats and thanks.
23rd December, 2008Stephen A.
As an outside observer, can someone explain why was it necessary to duplicate the Compiz effort in KWin? Almost all of these effects have existed in Compiz for quite some time (a couple of years, actually). Why not spend developer time improving, optimizing and integrating the existing framework, rather than rewriting it from scratch? Is this a typical not-in-house case, or is there something inherently wrong in Compiz? (I’m not criticizing your work, which looks awesome btw, I just want to understand the rationale.)
23rd December, 2008Lucas Murray
Because we would like the features in an environment that is both free to use and free to modify. Running OS X or Windows does not allow either of those.
Chances are you are running your multiple monitors in what’s called "multhead" mode. This is an unmaintained mode and is not recommended for normal desktop use. Please Google and ask your distribution communities about TwinView (nVidia), Big Desktop (ATI), MergedFB (Intel) and Xinerama modes as those are the ones that work absolutely fine and allow you to put Plasma on the other screens.
Short answer: There is more to window managers than just pretty effects. Compiz has the effects but sucked at everything else; KWin had everything else but not the effects. It was deemed "easier" to add the effects to KWin than to port everything from KWin to Compiz. We work with the Compiz developers at times as well as share code and ideas. This situation is not punishing either project but rather benefiting both as we are trying different ways to do the same thing—if one way doesn’t work the other has already solved it for us. Long answer: http://techbase.kde.org/Projects/KWin/4.0-release-notes
23rd December, 2008therobbot
Now present windows really needs the possibility to close windows on middle click and I won’t need Compiz anymore. :)
23rd December, 2008Anonymous
It would be much cooler if the Box Switcher would highlight the current selection with a heavy shadow under the window preview or something like that.
23rd December, 2008angmofo
I hope more thought has been put into kwin than in this post, you know (or maybe not as it wasn’t taken into account) not everyone has flash or can cope with the bs of streaming video, so it’s usually accepted that *also* providing the link instead of *only* embedding the videos is good practice, cause it allows people such as me to easily find the link to feed to clive (or any other "download from streaming site" app) to retrieve the video instead of scanning the source code of the page. This is especially true when there are several videos in a single page. Seems this webpage was made by someone not using linux for people not using linux (or at least people who support closed source proprietary software as in adobe flash, and support disclosing private personal information to Internet Big Brother as in google inc).
24th December, 2008Bobby
I remember criticising the magic Lamp effect when it was first implemented, saying that it didn’t look as nice as that of Compiz. I have to apologize for that comment at this point because you guys did such a damn excellent job that I am sure that the Compiz guys can now take a look at your code. These effect are so beautiful that I can’t imagine a desktop 7any desktop) without them. Well done guys and keep blazing up the place :) Btw, Merry Christmas!
24th December, 2008suy
@angmofo: Yes, flash sucks, but your complain about Lucas not providing a URL that you can feed to clive, is completely bogus: clive -S http://www.undefinedfire.com/kde/41-42-kwin/. It will download all the videos embedded in this page. Lucas, thanks for the effort you put in recording this videos and writing this blog post.
24th December, 2008Michael Krog
I have one simple wish for the Box switcher: It would be nice to have a switch that made it show icons instead of a scaled version of the window. Thats how its done i Mac OS, and I find it a lot easier to find the application Im looking for. :-)
25th December, 2008Kevin Kofler
> Although I cannot think of a distribution that hasn’t backported this Actually Fedora hasn’t backported the KWin cube. We don’t have any KWin backports at the moment (and probably won’t get them now because 4.2 is so close and we’ll just push it out as an update when it happens, unless you think we absolutely positively must get some feature(s) out to our users ASAP ;-) in that case you can ask us to include it/them in our upcoming 4.1.4 update). We did backport the "Taskbar thumbnails now work again in Plasma." stuff though. :-)
27th December, 20086205
Very nice, looks like that neverending story(aka Compiz) is finally going to be replaced with some real quality stuff :)
27th December, 2008jason L
That kiddy-like mouse theme is horrible. Even my four year old daughter hates it.
29th December, 2008angmofo
@suy: you’re right, but clive was just an example other tools won’t do the same, also having to download all videos when I want only one is not a valid solution nor is relying on a single tool, providing links to each video (very useful when available bandwith is scarce) is the expected way and a common practice among people who know better . But don’t get me wrong I’m not lashing at the person but at the bad behaviour, my point was "why using adobe flash (c) and youtube (c) and not using the obvious open source alternatives ?" If even the linux advocates don’t use them, then who will ?
3rd January, 2009kai cremata
this was probably the cleanest, clearest, and detailed new product review i have seen. thank you for a beautiful presentation.
5th January, 2009wejde
Discovered KDE a week ago, already blown away. Now I can even look forward to upgrades. Christmas ain’t over yet!
8th January, 2009Nikesh
Can’t wait to get my hands on KDE 4.2
10th January, 2009TomiF
AMAZING Work!! I like this!!!
18th January, 2009Knotyet
Meh, not bad. It’s turning out better than I thought it would. At least you got the cube working. I’m one of those PC-BSD users sticking with legacy releases because I couldn’t stand KDE4 and NEED Compiz-fusion with ALL of my plugins and customizations (I love screen fire :). If/when Kwin catches up with Beryl/Compiz & KDE4 apps actually work (K3B-Amarock) I’ll update and test then. Oh, run your flash under .wine and everything’s fine except for the fact FLASH STILL SUCKS!
20th January, 2009Tom
Wow, these effects are amazing, i think that im going to be switching to KDE very soon on my ubuntu system! Thanks alot!
20th January, 2009Troy Robinson
This may be the perfect way to wheen myself of windows.
27th January, 2009A KDE User
Great Work, just to say I like it. If you guys finish porting KDE 3.X applications to KDE 4.X and improve the bugs feedback (maybe automatic bug reports) you will have the best GUI in the world….
29th January, 2009shaurz
I had fun playing with these effects. But I have disabled them for now, since they slow down window actions quite a bit (e.g. maximise window delays by about 1 second, instead of being instantaneous). Unfortunately they are not smooth and fast like Vista, yet! (And I am running on a HD 4850 with fglrx which should cope with it easily). Also wobbly windows break the window snapping behaviour, i.e. the only KWin feature I care about. But I think that effect is only for show, nobody would actually use it?
Have your say