Unity Window Decorator

Some folks have been asking me about this strange new repository which popped up on git few weeks ago, called unity-window-decorator. So that there isn’t any confusion, I might clarify exactly what that is so that people don’t get confused. Basically, it is a feature fork of the GTK window decorator that ships with compiz (yeah, I know, an upstream forking their own project, wtf right?). Anyways, there isn’t really anything that big to it at the moment, all it does is add support for reading and rendering some extra properties which I hacked into the metacity theme spec (which explains that other repository) such as shadow radius/opacity/offset for different window states (eg the theme can define different shadows for maximized, focused etc windows) and also adds support for defining an “invisible grab area” around the side of the window so that you can have windows with really thin borders, but still grab in the shadow area just outside the window.

The reason this is a fork (for now) is because it does depend on those changes to libmetacity-private and it makes no sense for the compiz project to ship a decorator which depends on a patched library. The plan is, of course, to get the changes to the metacity theme spec upstreamed once I’ve finished working on them and to merge the changes made to unity-window-decorator back into the upstream gtk-window-decorator. But otherwise there’s nothing too much to get excited about – just some small changes to make the experience slightly better 🙂

Also, I might just let the rest of the community know for now that the fix for menus and other windows being stacked weirdly at times (most likely at login) is being worked on (by me) and hopefully there will be a fix for it soon. It is unfortunately a rather complicated issue to do with the stacking code in compiz, where a race condition can happen which can cause the tracked stack and the X11 stack to become wayyyy out of sync (this is why your menus are functional as normal but painted in the wrong order). And another unfortunate thing is that it seems that everyone is able to reproduce the bug *except* me (my oh my I enjoy a working system!) I’ll update everyone once the bug is actually fixed.

Update: Fixed!

9 thoughts on “Unity Window Decorator

  1. Hmm, is there the possibility that this work will also bring antialiasing for window corners? I know it would not be so trivial to accompish while still relying on metacity theming capabilities, but it’s worth asking 😉

      1. Uhm, that’s a pity, but you are all working very hard to make Unity (and Compiz 😉 rock, and that’s just a small detail, so that’s certainly fair 🙂 Thanks for your answer!

        1. If you know a bit of code yourself, it might be possible to do it from within the theming engine, although I don’t have time to look into that myself right now. I believe that someone was trying their hands at antialiased shadows.

          1. I’m sorry, but I can’t code… I think somebody (Cimi?) tried to add antialiased svg/png images for corners during the Maverick cycle, but apparently he didn’t succeed or didn’t have the time to finish it. I did an emerald clone of Ambiance, but that’s certainly not an option.
            All I can say is that it looks a bit awkward on light backgrounds, especially since all the rest of the interface is so nicely themed and looks so modern. I would really like to be able to fix it myself, but that’s not the case unfortunately…

  2. This is great! Any chance that this will also add support for metacity’s differing geometries/styles for utility and dialog windows? It’s one of the few things that i miss from metacity while using Compiz.

  3. I am having a problem with unity-window-decorator for sometime. When I start my computer and check the memory use, this code takes around 20 – 30 MB but as the computer is on for hours its memory use increases to almost 90% of the total memory. This really slows down my computer. What can I do to stop this code consuming so much memory?

  4. Hi, what did happened to this? I’ve been using ubuntu 11.04 the last year and half because I don’t like pretty much the changes introduced with unity in 11.10 and 12.04. As this month natty loses its support I’m giving a try to 12.10, but I found that there is no longer unity-windows-decorator, instead windows decoration is handled by gtk-windows-decorator and it has a unexplicable limitation at 18.0 to the windows shadow radius.
    I do like having a big shadow for the focused window, I’m using a 45.0 radius right now (with natty and unity-windows-decorator) and I can’t get the a result not even closer to it with Quantal Quetzal. I know this is a very minor detail, but I was searching, if it can be done, welcome, I would like to know it.

    Thanks!

Leave a reply to Sam Spilsbury Cancel reply