Open Letter: The issues with client-side-window-decorations

Hi Cody,

as you wanted to have a mail with all my concerns about client-side-window-decorations (CSD), here is a very long mail presenting all my concerns what will not be possible any more with CSD and why I think that these particular features will be impossible. The list is based on KWin’s current feature set.

Please see this mail as an offer to help. I could also just say “what do I care? We won’t support it in KDE, so let them destroy their desktop if they want.” But I do care. I do not want to blame your work, but I fear that you just don’t see the disadvantages and that CSD will be pushed onto the users without considering all pros and cons. That’s why I decided to CC the Ayatana mailinglist and publish this letter as an open letter on my blog. CSD is a topic that is important for every user and nothing we should discuss in a small group.

As you probably have noticed I oppose the introduction of CSD. I think they will have more disadvantages than benefits to the user. In fact I do not see any pro argument for CSD. All the pros I found during hours of research on some wiki pages, GNOME Shell design documents, blog posts, etc. do not give one valid reason. In fact most of the pro arguments are already present in KWin. I will refer to the arguments for CSD again at the end of my mail. If there are any other pro arguments not recorded on the Wiki page, please publish them.

  • Consistent window decorations: This in fact is my greatest doubt. The current situation is that all windows have the same window decoration. For CSD to work applications have to be changed to support them. This will render the changed applications using CSD while all other applications are decorated by the window manager. I think it is impossible to have the same behavior for both CSD and wm decos. I think there are lots of legacy applications which cannot be changed, for example Amarok 1.4 which is still used by many users even in GNOME. I doubt you will be able to change Qt 3 to use CSD. My bigger concern is that we will end up with applications shipping their own style and doing their own kind of decorations. So we end up with situations like one window has buttons on left, one on the right, one in order close, maximize, minimize, the other in close, minimize, maximize, etc. Why do I have this concern? Well let’s just look on the Microsoft Windows desktop to see what proprietary applications tend to do when they get the chance to influence the decorations. I expect the same thing to happen on free desktops as we already have such style issues with proprietary applications. For example Google Earth and Opera both do not use the default Qt style but ship their own one. In case of Google Earth it’s even bundled with an own Qt copy so you cannot even overwrite the setting. I also expect that “free” software will do such issues – to get a famous example: launch Chromium in Ubuntu Lucid. It has the decoration handles on the wrong side. And for the user experience this is very bad.

    Now I want to explain why it is impossible to have consistent decoration handling between CSD and wm decos in the case of KWin. KWin has a default button layout (Menu, sticky on the left, (help), minimize, maximize, explicit spacer, explicit spacer, close on the right), which is hardcoded into the source code. The layout could change at any time if the KWin developers and the usability team decide that there is a more usable layout! Each decoration plugin is allowed to overwrite the default button layout (which is done by the default decoration Oxygen). In case of my theme engine Aurorae each theme is allowed to overwrite the default layout. However, that’s not all – the user is allowed to customize the layout. So to get it right CSD would have to check which decoration plugin is loaded and would have to know how the button order is defined. As this layout is also hardcoded this is just impossible. The CSD would have to guess KWin’s default layout and check KWin’s settings if the user has changed the layout. I doubt you want to add KConfig support to GTK CSD. The whole situation becomes more complicated if a user is using Compiz in KDE. In that case the CSD would have to check if kde-window-decorator is used, which would require to parse the KWin settings or to read Emerald or whatever. Let’s just forget about other window managers as the point is already obvious: a client-side-decorated window cannot know how the layout of decoration buttons in the window manager decorations is set. In order to get CSD working properly all windows would have to use CSD and as said before this is just impossible due to legacy applications. There is one more important thing to know: KWin guarantees binary compatibility for the decoration API for the lifetime of KDE platform 4. We cannot change the decoration API in order to support CSD without breaking BC and all decorations!

  • Closing hung applications: Currently there is an easy way to close a hung application. You click the close button in the decoration and the window manager will notice that the application does not response any more and will offer to forcefully close the window. With CSD this is impossible. The close button is part of the hung application and so the click event cannot be recognized. I do not expect users to know shortcuts like ctrl+alt+esc to forcefully close a window and so they will be stuck with an unresponsive application. In case the application is caught in an endless loop this would render the system unusable and an unexperienced user has only one choice: force the system to reboot by the power switch.
  • Consistent user actions between decoration and task manager: KDE keeps the context menu of the decoration and the tasks applet in sync. It uses the same order of options, the same look&feel and the same wording. If a change is required it has to be manually submitted to both menus. I can’t see how a non-KDE application wants to be in sync with KDE’s context menu. I don’t think I have to mention that the context menus are currently all using a Qt style. As we all know GTK does not look like Qt in KDE. So there will be a visual inconsistency in context menus. (Seems that I mentioned it nevertheless) Btw different window managers offer a different set of features. So one menu for all window managers just doesn’t work.
  • User actions menu in general: This brings us to the next topic: What happens in response to right clicking a CSD. KWin by default shows the user actions menu including KWin internal options like window tabbing (if the decoration supports it), opacity and the option to configure the window behavior. Will a CSD be able to populate KWin specific options? How do I access the window behavior settings from a client side decoration? What happens when I use the shortcut to show the menu (alt+f3) which is handled by KWin? Why is it a different one for CSD, while it is the same for all other windows? Another case of inconsistent behavior.
  • One place to configure mouse actions: Another point directly motivated by the one before: what actually happens if I left, right, middle click the decoration. KWin provides completely configurable actions in the user interface. I wanted to present all possible options but there are too many, so I just write down which different actions are supported:
    • doubleclicking the decoration (just titlebar, not border)
    • mouse wheel the decoration (just titlebar, not border)
    • different settings for what happens when you left/right/middle click the decoration (titlebar and border) for active and for inactive window.

    The settings include things like open context menu, place window to the back, raise window, start window tab dragging, etc. etc. If you want a complete list of options please have a look on the settings. I do not see how a CSD can know about what is configured in KWin. This just has to result in inconsistent behavior and complains by users because right click opens the context menu and does not move the window to the back.

  • Different settings for the maximize button: KWin supports to configure the action which should be performed when left/middle/right click the maximize button: maximize horizontal, maximize vertical or maximize both. This is an issue where I ask myself: will this be supported at all and of course the same as above: the CSD cannot know KWin’s setting.
  • Differentiating between window and decoration: KWin currently supports different actions when you click the window and the decoration. E.g. it’s possible to raise a window by clicking the titlebar, but clicking the window content will raise and activate it. As there is no decoration provided by KWin any more this functionality would be lost completely. Removing title bar actions means that many useful features are lost, like wheel on titlebar raises windows or changes opacity. You don’t want that functionality in the window as the window needs the wheel event to scroll the content.
  • Window Shading: window shading is a tricky operation for CSD and I don’t see how you could get it working. I just had a look at the KWin code and it seems like window shading requires wm decos. The window get’s unmapped and only the deco is shown. I don’t know how KWin would behave if the window is undecorated, but I think that window shading is not possible any more. Even if it were possible we would have again a very inconsistent behavior as the decoration handling would switch from client-side to wm. To this point I want to quote the NETWM spec:

    Some desktop environments offer shading (also known as rollup) as an alternative to iconification. A shaded window typically shows only the titlebar, the client window is hidden, thus shading is not useful for windows which are not decorated with a titlebar.

  • Adding additional buttons: KWin allows to add additional buttons to the decoration. Our default decoration provides buttons like keep above, keep below and shade. By default a sticky button is used. Our default layout has more buttons than all the decoration themes provided by Ubuntu. I am very concerned that CSD will not have the same set of buttons and that it is not possible to globally add/remove buttons as it is possible today. The reasons why that is not possible have been presented in the fist topic.
  • Remote X-Clients: If a session includes remote X-Clients using CSD these will use the GTK style of the remote system resulting in inconsistency. Currently this works fine as remote clients are treated like every other client.
  • Shadows: A CSD window will not have a shadow provided by KWin. Shadows are an important feature to distinguish the active from inactive windows. As it is not obvious why we cannot provide shadows for CSD windows I have to explain how the shadow works. Since 4.3 the decorations are able to paint shadows. This is a KWin internal thing: the decoration provides a padding region and this region is internally ignored for things like window snapping and to ensure that the shadow is not clickable (as the decoration is a widget this is important). Currently Oxygen and Aurorae are the only default shipped decorations making use of this feature. If a decoration does not provide it’s own decoration the shadow effect will draw a shadow. There is exactly one variant of shadow to suit them all. And this is just impossible. If you have a dark widget theme a dark shadow is a bad idea. The shadow is a texture which is painted below the window texture. This means if the window has an alpha channel the blending will be done to the shadow and not to the windows below which looks really bad. Just search for images showing a translucent Konsole in KDE 4.x with x < 2. Now I still haven't mentioned why a CSD decoration won't have a shadow. We see why it would be a bad idea (as you want to have an alpha channel) but there is more in it. I assume that you want to have round corners in your decoration. So you have to set a shape or your corners will be clickable (bad idea). If a window has a custom shape the shadow effect will not apply the shadow to the window as it doesn't know the shape. We could just paint the shadow but in most cases it would look really bad or we could find some tricky logic that looks where the window is painted and how to draw the perfect shadow. We haven't found a solution to this problem during the last 2,5 years and I do not expect that we find a solution to this issue in the future. It would require shaders so it is not an option which would work for all users and I think that the shadow inside the decorations is the better approach. Oh and what we currently do to decorations cannot be done by windows as that requires changes in the NETWM protocol and in the window managers. As you might guess I am not interested in spending time on adding stuff to KWin required to make CSD work ;-)
  • Tooltips: KWin has a setting to provide tooltips when hovering decoration buttons. I do not see how this can be consistent between CSD and wm decos. Obviously the tooltips won’t look the same as the one is GTK and the other is Qt. Furthermore I don’t think that the titles of the tooltips can be the same and even if they were the same I don’t think that they would be translated in the same way in all existing languages. This is another case of inconsistency.
  • Netbook mode: KWin has a special netbook mode to hide the decoration for maximized windows when the netbook mode is chosen. I do not see how a GTK CSD window can honor such a setting.
  • Accessibility: KWin provides globally customizable border sizes. Some decorations (Oxygen and Aurorae) also provide customizable button sizes. Both sizes are dependent on the decoration or in case of Aurorae from the theme. So there is no way for a CSD to get the same border size. I think accessibility is a very important feature. In fact Aurorae allows to change two settings: border size and button size, everything else is defined in the theme.
  • Window Tabbing: KWin’s window tabbing is part of the decoration API. A window which does not have a decoration cannot be included in window tabs. So it destroys a useful functionality.
  • Numbering in window title: KWin provides a feature to number the windows. So if you have two windows foo, the second will be called foo <2> in the decoration. This is specified in the _NET_WM_VISIBLE_NAME hint, so in fact it is possible to implement this feature.
  • Forcefully adding buttons: KWin allows to add buttons to window decorations even if the window does not provide the action. E.g. if a window is not closeable we can force it to be closeable by a window rule to get the button back. My concern is that with CSD the application would not add the button again as it has in the internal logic that there is no close button for this window. The same obviously applies for maximize button, etc. KWin allows to overwrite any of the settings a window might set, which is the right of a window manager.
  • Changing themes: KWin and also Metacity allows to change the themes for all window decorations at one place. If we introduce CSD we have some applications having a wm themed decoration, some applications with a GTK themed decoration and some with a Qt themed decoration. If we introduce CSD the current setting dialog is more than confusing and would have to be removed. Btw I just want to mention that I rewrote the KWin decoration selection module for 4.5. More on the work going on in KWin regarding decorations later in this mail.
  • Probably much much more I just have not thought about yet or forgotten to mention in this list. I think the point is obvious: we have a well established system and there have to be good reasons to change something so fundamentally to the window behavior.

This brings me to the next topic: The pro arguments of CSD. The point is: I do not know of one pro argument. I thought a lot about why do they want CSD and all I can come up with is that you want RGBA windows, but this is no reason to go for CSD. This is perfectly possible with KWin since 4.4, so I do not see why you would want to go for CSD. If there are other reasons please communicate them. And please use this list as a starting point to step back and think about what you want to achieve and if CSD is the right approach to achieve it. If all you want is RGBA it will be easier to extend Metacity to support it or (in case of Canonical) switch to a default window manager which supports it. I assume that Ubuntu 10.10 will be shipped with Compiz 0.9 so you could get a window manager which supports both non-compositing and compositing and alpha in the decoration. And I just want to mention that Ubuntu has another window manager in the main repository which supports all the required features, but I don’t expect Ubuntu switching to KWin as the default window manager 🙂

So let’s look again on the list of pro arguments on the GNOME wiki:

  • Fix issues with the non-reparenting window manager Compiz: Not an issue any more as Compiz 0.9 is a reparenting window manager. Nice this one is done
  • Have a good reason for RGBA: As mentioned KWin supports this by extending the window decoration behind translucent content (http://blog.martin-graesslin.com/blog/2009/11/window-decoration-behind-translucent-windows/). So you could go for this approach. Just as a note: KDE does not make use of this feature, but it is supported. so not valid.
  • Possible performance improvements: please test if it is really an improvement. Considering KWin’s approach to RGBA decorations I don’t think it is. Just the idea that there could be improvements is not a valid argument.
  • single source for theming the application and decoration: that would be nice, but as my concerns in this mail show, the opposite is most likely true. I love that idea, but could you please first fix GTK to use the Qt style in KDE environment? That would be nice from an integration point of view. So not valid.
  • Get gtk+ working on Wayland: I don’t see how Wayland can be an argument for CSD. Could we consider Wayland as unimportant till it is looking like something is actually going on? I checked the commits in 2010 in the public git repository and well it looks like KWin has more commits per day. It’s nice that you think of the future, but please don’t use it for argumentation. So also not valid.

And that’s the problem I have with CSD. I have a very long list of issues, so to say the cons and there are no valid pro arguments. I like innovation, but I completely dislike innovation for the sake of innovation. I also dislike to break with existing solutions. If we break existing solutions there has to be a good reason for it. And here I am still missing the good reasons.

Now last but not least I want to present some of the work going on in KWin for decorations. Decorations are currently the most actively developed part of KWin. In 4.3 we added support for translucent window decorations, in 4.4 we added support to paint decorations behind translucent windows and we received window tabbing support. Currently there is a very active development in our default decoration Oxygen and in my theme engine Aurorae. I initially implemented Aurorae for 4.3 to have a decoration which makes use of translucency. Since 4.4 Aurorae is part of KWin and I have spent much time on improving it for 4.5. So it is now based on the Qt GraphicsView framework, it allows to place the decoration to the left or right to make better use of vertical screen space. The theming support is improved, so it’s possible to have one common background for a button group. That’s something the Canonical designers might like – in fact this feature is inspired by the brokeness of the new Ubuntu theme during the beta phase of Lucid 😉 I started to work on a designer application for Aurorae themes. The decoration configuration module has been reworked and allows to directly install new themes for kde-look.org through GHNS. I have some more ideas for Aurorae in 4.6. So I want to make the decoration auto-hiding for maximized windows to save more vertical space. I am thinking about adding a special element for fullscreen applications to easily switch back to normal mode. I plan to make Aurorae a common library which can be used not only in KWin but also directly in Compiz. In fact the Aurorae code does not have a KWin dependency any more. This was required to get the designer work and is also used to render the previews in the configuration module. I think it would be a pity to abandon all this work and to replace it with something that is not on par from the feature side of view. And AFAIK also in Metacity there is some work going on to design a new theme format.

So as expected this mail has been rather long and I think I missed probably have of the points I had in mind. Thanks for taking the time to read it and thinking about if CSD are the right way to go. If you have questions how to get your wished features to work with existing technology please do not hesitate to ask and I will try to help you. I am sure the Compiz devs will also offer their help to get required features implemented.

Regards
Martin GrĂ€ĂŸlin

Follow-up on client-side-decorations

As there has been quite some reactions on my recent blog post explaining why client-side-window-decorations are a bad idea I decided to answer some of the comment in a new blog post.

First of all I want to say that Canonicals idea for windicators is not the reason why I dislike the idea of client-side-window-decorations. I am afraid of this development for quite some time and wanted to write a blog post on that issue for quite some time. German readers of this blog post might have noticed that the current issue of freiesMagazin contains an article I wrote in March on that topic. The fact that it was published almost the same time as Mark’s windicator announcement is a lucky coincidence. So windicators are just the catalyst for writing the blog post. While I don’t think their idea is a good one (in fact I wanted to announce Plasmoid support in Aurorae as an April fools article) I do not oppose the development in general. I just oppose that it is now another (false) reason why we need client-side-window-decorations. Yes it is possible to implement something like that in the current KWin decoration API and I think our recently added support for window tabbing should be proof enough that window decorations can be extended.

In my blog post I mentioned that client-side-window-decorations will destroy consistency. Apparently many readers thought I mean visual consistency. While this is an issue I don’t expect fixable (if it were fixable, why is my Mozilla Firefox looking different to all other apps?), it is not what I meant. I am afraid of the much worse behavioral inconsistency. Just try using Chromium in Ubuntu Lucid and you will know what I mean. The obvious counter-argument to that concern is that the Qt and GTK style will be patched so that all apps will share the same decoration. But will this work? I doubt it. What about all my legacy, proprietary applications I just cannot patch? They will have the window manager decorations. What about applications the authors don’t want you to patch because it’s destroying their brand? This is a real concern and to me the consistency in behavior is more important than visual glitches or a little bit more space due to removing the status bar. What I also want to note is, that KWin has many more features regarding decorations than e.g. Metacity. This is I am afraid that GTK+ decorations will at maximum gain feature comparity with Metacity.

Cody Russel commented and said that we just should relax:

Settle down, people. This is just an experiment, and if it turns out that it doesn’t work well or doesn’t gain us anything then we just won’t use it.

Now Cody, I have to disagree. Now it’s the time to raise the concerns. Canonical is starting to build up a new functionality on it. If we do not make clear that client-side-window-decorations are a bad idea this "experiment" will be in 10.10. Canonical has unfortunately a history of ignoring all concerns and shipping their utterly broken concepts and trying to upstream their strange changes (just remember replacing the suspend notification by a nag-screen). Sorry that I do not buy your "it’s just an experiment".

Cody continues:

The reality is that client-side decorations is something I proposed, and there has been interest in it from Intel, Red Hat, Google, and now Canonical. I’ve even mentioned it to someone at Nokia once and he seemed at least interested in it.

It’s nice that you talked to all those corporations. Apparently you failed to communicate with the KDE, Compiz (and GNOME?) community. The fact that these corporations are interested does not turn the feature into a good idea. Sorry, I couldn’t care less to which corporation you talked.

I honestly don’t think this is going to affect you in any way. If you’re running KWin or whatever, and you run a GTK+ application under it.. just don’t run a theme that enables client-side-decorations if you’re concerned about how it’s going to fit into your environment.

This is a nice one. Is this a promise that I will never get a bugreport because an app seems to be broken because of client-side-window-decorations? Does that mean that I can reassign each bug to you? I do not just think of me, I’m thinking of my whole userbase and also of GNOME’s userbase. And introducing client-side-window-decorations is calling for trouble. Just an example we have with Chromium: since KDE SC 4.4 we unmaximize a window when it is moved. KWin has a drag delay, Chromium doesn’t. So clicking anywhere in the decoration area will unmaximize the window. This is an application bug, the developers don’t want to fix. You see, I have valid concerns to such ideas.

Now on planet GNOME there was one direct reaction to my blog post trying to invalidate each of my arguments. I spare you the details by just pointing out one of the "it’s not true" points:

Window rules like always show a close button even if the window is not closeable: Working around broken apps? Fix your apps…

Is that really the level of argumentation? That sounds like someone did not find arguments. But I understand: Metacity does not provide window rules, so you are not able to see the advantage in features you don’t know. As mentioned above with the Chromium bug: sometimes bugs are not fixable, especially if it is your legacy proprietary application.

The blog post contains some more "reasons" why we need client-side-window-decorations.

Tear-free window resizing (when the client is doing the resizing, with a proper resize grip for example)

I have tear-free resizing and Oxygen can provide a proper resize grip. Even if it were not possible: shouldn’t we fix the window manager? *scnr*

Better integration of resizing within applications (say "zooming" when going to fullscreen

Erm right, never noticed this missing usecase. Takes me half an hour to implement that as an effect which will be fast and not slow due to constant resizing of the window content.

Proper way to do tabs in titlebar, a-la Google Chrome

A right, that’s why KWin has window tabbing 😉

Window-as-a-document/object

Why do we need client-side-window-decorations for that?

The best thing in this blog post was the link to the GNOME Wiki where we can find all the real arguments.

  • Fix issues we get with non-reparenting WMs like compiz that transform the window and the user can see an ugly polygon edges between titlebar and app

When I was reading this I got such an laugh-flash that my roommate was asking what happened. First of all you should fix your appsℱ, second you should do your homework: Compiz will be a reparenting window manager in the next release. So reason number one is invalid.

  • Have a good reason to push for rgba windows 🙂

WTF? Honestly? You want to break all applications just to get rgba? I know Metacity does not support RGBA in the decoration, so fix itℱ. The way KWin added support for RGBA should work for Metacity as well. We even added a new EWMH hint so that the window can request that the decoration paints the background, if you want a translucent theme.

  • Possible performance improvement in reparenting WMs where there is currently a mismatch between client/decoration visuals?

So you are not sure if it will provide improvements? If you go the KWin way it should be fine

  • single source for theming the application and decoration

Yes would be nice to have and exists. It’s called QtCurve

  • Get gtk+ working on Wayland

Wayland? Come on, get real arguments. We can talk about that in erm let’s say ten years?

So that’s it. There are not more arguments pro client-side-window-decorations. So I read through all these documentations and arguments and to quote Faust:

Da steh ich nun, ich armer Tor!

Und bin so klug als wie zuvor

I still do not see any reason why we should break with a concept which has worked properly in the last 20 years or even longer. Why replace something working with something which cannot work, which will cause many, many problems. I am looking forward to a discussion on these issues. I just hope we won’t find it in the next Ubuntu release and all users have to suffer from a misconception during the design phase.

=-=-=-=-=
Powered by Blogilo

Why you should not use client-side window decorations…

So finally I know who had the idea of client side decorations: it’s Canonical. Why didn’t I think of it before? I have been aware of the fact that GTK wants to do client-side window decorations since it was mentioned on the EWMH mailinglist and I think it is a completely stupid idea which has the potential to destroy one of the most important advantages of the free desktop: a consistent client handling.

For those who don’t know what client-side window decorations are: the window client, that is the application draws the titlebar instead of the window manager as we have it today. I will discuss the disadvantages of this approach later in the post.

Up to today I have not found any valid reason why you should even think of client-side window decorations. Well Mark provides a reason: windicators. A kind of Statusnotifier inside the application. As the window decoration cannot do it (today) it is the logical consequence to remove decorations. It would not have been possible to extend an existing framework.

Well to be honest we get request to add arbitrary functionality like a mute button in the decoration about once a month. And we always say no, because it is not possible as there is no common interface. With something like a dbus protocol these "windicators" would be possible, not that I’d think it’s a good idea.

But apparently Canonical did not think of extending the existing functionality, but to remove the functionality. There is already one application which uses those client-side-decorations and it’s called Chromium. If you want to have an impression on the consequences of client-side decorations, just go through all open KWin bugs and look for the mentioned applications. I think you will know which one is currently my most loved application from a wm-dev perspective.

So what will we lose due to client-side decorations?

  • Consistent behavior between all applications no matter if it is a Qt or a GTK or $Toolkit application
  • Window Tabbing (KWin specific)
  • Window rules like always show a close button even if the window is not closeable
  • Accessibility features like big border and button sizes for all windows
  • Easily changeable window themes
  • Shadows which are part of the theme (KWin would not paint shadows for a client-side window-decorated window)

In general up to now I always read of the same advantages, like it saves space. But that is just not true. The KDE Plasma Netbook Shell illustrates in a perfect way how we can use space more efficient. I also have some ideas for Aurorae like decorations on the left/right (implemented) and autohiding decorations for maximized windows (due to upcoming feature freeze probably 4.6). Also I think that Rekonq is a nice example to show how we can use the limited vertical space in a well thought way. Yes I agree that statusbars are somewhat useless and outdated, but just look on Rekonq’s clever behavior for statusbars. Or think of KDevelop’s (congrats to the release, I love your application) usage of the empty space next to the menu bar. Of course we have some problems of space wasting, but that is no reason to break with working solutions.

To summarize: client-side-decorations will destroy more than they benefit. Please devs at Canonical, please think of the consequences. Please think about the fact that you have to change all applications, please think about that your Upstreams might not like the idea, please think about more than one or two years. Please have a look on the Microsoft Windows platform and the totally inconsistent window behavior. Think about how the free desktop could look like if we start to use client-side decorations allowing each program to enlighten us with their preferred idea of window management. If we get client side decorations, Mac OS will be the last useful system with a consistent behavior and I think we can agree that this is not a nice few. Please remember that a window manager is called a manager, because he manages the windows. I do not like to see mistakes fixed ten years ago in the window managers to be present again (what about a drag delay in moving windows on free space in the new Ubuntu GTK theme?).

As far as I followed the small discussion on the EWMH specific mailinglist, the idea is that the window manager has to announce that client-side-decorations are allowed. This means that we as KDE have the option to not implement this "feature" so that our desktop will still have a consistent user experience. It’s also our chance to raise the concerns again when it is discussed on the mailinglist in more detail (which has not happened, there has not been any discussion, if we want client side decorations or not). Given that Metacity is developing a new theme engine, I hope that also the GNOME community opposes such ideas.

I also hope that Canonical will start to discuss such ideas with their upstreams. There has been no discussion about NotifyOSD and their removal of actions. With the "Panel Indicators" I though that Canonical mastered this part of their history and starts to collaborate. Now it looks like alea iacta est again, without any chances for the upstream to raise concerns 🙁

=-=-=-=-=
Powered by Blogilo

Announcing Aurorae Designer

I’m proud to announce the initial release of AuroraeDesigner, a small application to design Aurorae themes. At the current state of development it is possible to open an existing theme and get an interactive preview of the theme and change all configuration details. The changed configuration can be saved, but I’d recommend to backup the original file before starting to play with the designer 😉 Packages are available for openSUSE through the openSUSE build service. As it depends on 4.4, I was unable to build packages for other distributions.

Aurorae Designer
Aurorae Designer

For this designer I basically rewrote Aurorae upon the graphics view framework. As soon as it has reached feature parity (currently 90 %) it will become the base for the KWin decoration engine which will require a switch from KCommonDecoration to KDecoration, so I will be able to add features not possible with KCommonDecoration (e.g. decoration on the left side of the window).

If you are a designer of a theme: don’t worry. The new implementation is completely backward compatible, so your theme will look the same in 4.5 as it does in 4.4. Nevertheless there will be some new features added before 4.5 (e.g. window tabbing) so you should update your themes. In future releases of AuroraeDesigner I want to add a check method, so that you can easily verify that the theme contains all required elements.

As the screenshot illustrates the new Aurorae framework will also solve the question about buttons on left or on right: just show the elements on both sides 😀 But as it will not be possible to configure that in KWin I’d recommend to not use this "feature" 😉

=-=-=-=-=
Powered by Blogilo

KWin in Tokamak IV

Unfortunately Tokamak is already over for me 🙁 I’m just sitting in the train back home, as my Thesis wants to get some finishing touch. I really enjoyed these three days. From the social point of view Tokamak is just like Akademy a great experience. And this Tokamak was really big. The openSUSE offices are a perfect place for the sprint as there is one room big enough for all of us and several small meeting rooms for the small breakout groups. Thanks again to Will for organizing everything.

On Saturday we mainly had presentations and today the breakout groups started. In the morning we had a small discussion about activities/context/whateveritscalledthesedays and came up with a small API for activitiy management. Looks like the KWin part will be easier to do as initially expected as we can use quite some of the virtual desktop code to (un)hide windows whenever the activity changes.

After lunch we started two discuss Plasma/KWin integration. I had a list of points for better integration and the funny thing is, that most of the issues the Plasma guys and girl mentioned were on this list. Quite good that we see the same points for improvements. The discussions were really productive and I think we found consensus in all discussed topics which will hopefully result in code written and a way better user experience. One of the discussed issues was an improved dashboard. Currently the dashboard is just a normal window, resulting in issues like it’s possible to alt+tab or start present windows. The idea is to tell KWin that the window is a dashboard and that we add special support for it including a nice fade-background effect replacing the currently black background rendered inside the dashboard.

Due to overlapping schedule I was unable to attend the mobile session. I will probably try to get KWin compiling on Maemo, which requires a port to OpenGL ES 1.1. I thought that N900 requires ES 2.0 which would require a shader scene and way more changes to KWin code base including huge #ifdef areas. OpenGL ES 1.1 on the other hand is just a stripped down version of OpenGL 1.5. So getting KWin compiling should be much easier. Of course there have to be some changes as some currently used calls are unsupported, but removing glBegin/glEnd and switching from rendering quads to triangles will probably improve overall KWin and as I have a "port" of KWin to OpenGL 3 in my local git repository I can (hopefully) just cherry-pick those changes.

=-=-=-=-=
Powered by Blogilo

New Decoration control module

There are a few things in KDE’s desktop shell which have not changed for a very long time. For example I remember that the first KDE version I used (that was a 3.x with x << 5) had the same control module for window decorations as the one we will have in KDE SC 4.4. The interface displays a dropdown list with the names of the available decorations, a configuration panel for the selected decoration and a preview. This results in wonderful tabs inside tabs user interfaces – just look at the Oxygen configuration in 4.4.

With KDE SC 4.5 there will be a new interface which could be called the Qt 4 port of the decoration control module. The dropdown is replaced by a list view displaying previews of each decoration. The configuration panel is moved to a dialog which is accessible from a configure button next to the preview.

New decoration KCM

As I think it’s important to honor those who should be honored a button to access about data has been added. So if you have written a decoration please add your author information to the desktop file of your decoration.

Aurorae themes are included in the list just like "normal" decorations. The fact that Aurorae is a theme engine is an irrelevant implementation detail for the user and by that it should be hidden. And so KWin finally supports Get Hot New Stuff for decorations – that’s just awesome. I hope we will be able to integrate deKorator themes in the same way.

Unfortunately I was not able to finish this for 4.4.

=-=-=-=-=
Powered by Blogilo

About click through interfaces

I just read about Colibri and that motivated me to write a blog post I wanted to write for a long time. First of all I think it’s an improvement that the Ayatana notifications are now packaged and not patched into the system as in Karmic – one of the reasons why I am using Debian, now 😉 (I still think that notifications are a central part of the workspace and that a downstream should respect it’s upstream’s decision on that point.)

But that’s not the point of this post. I want to talk about click through. AurĂ©lien advertises the Colibri notifications as click through, that you can interact with the window underneath. I think that is the failure by design of the Ayatana notifications. The fact that it’s missing actions in the notifications is just a consequence of it.

So what’s the problem with the click through? It requires compositing. A click through is only useful if the window you click through is translucent. But we do not always have compositing. There are systems where it still doesn’t work – even new ones. There are users who don’t want to use it and there are situations when kwin just turns it off due to bad performance.

Consider the situation that you are a user of a non composited environment and the notifications are shown on the upper right as in AurĂ©lien’s screenshot. A notification appears and you click on it so that it goes away, because you do not know that they are queued. The window underneath the notification will be closed in the worst case if the click hit the close button. That’s probably not what Joe User expects. So when the environment is non-composited a click-through is a no go. The same is true if the notification is opaque or hardly translucent. But based on the description they fade away, so that is not a problem.

A solution to the non-composited environment is to make the notifications not click through when compositing is turned off. But that has drawbacks as well. Consider the situation that an experienced user knows about the click through and suspends compositing (something I do quite often). Now a notification appears and he wants to interact with the window underneath as he knows the geometry. The click is eaten by the notification although he expects that it goes through. So in that case we have a behavioral change which is in my opinion as bad as the not expected click through.

So we see as soon as compositing is turned off it breaks. So the fault in the Ayatana specification in my opinion is that functionality depends on visual representation. I’m pretty sure such a mistake would not have happened in Plasma as there are devs who can’t use compositing: "Erm you want to do that? I don’t have compositing that wouldn’t work for me." In kwin as well we ensure that compositing only adds additional features without breaking anything if compositing is turned off that is all compositing features are optional effects.

And just to make sure: this is of course no critic to AurĂ©lien’s work. AFAIK he joined Canonical after the spec was designed and he just implemented the KDE part. I also appreciate that Ayatana is now using KDE’s status notifier spec instead of inventing yet another solution. So most of my critics on Ayatana’s approach which drove me away from Kubuntu are not valid any more (except the point mentioned in this post).

=-=-=-=-=
Powered by Blogilo

Window decoration behind translucent windows

Yesterday evening just before the hard freeze a nice feature was added to KWin: window decoration painted behind translucent windows. Have a look:

Currently it’s supported by Aurorae, our only translucent decoration, and I think there are no applications yet which use the feature. But as it is proposed as an addition to EWMH I’m sure there will be in future. Somewhere I read that Mozilla Firefox wants to use translucent backgrounds. So that is your solution for the X11 platform.

Well this feature illustrates that we need a blur effect 😉

=-=-=-=-=
Powered by Blogilo

Working on KWin Shaders

This weekend I worked on some KWin OpenGL Shaders. That is I wanted to bring back the blur effect. It seems like many users want to have the effect and well with translucent window decorations a nice blur is kind of needed (yes we get compared to Windows 7 and that blur is really well done). The first results look very promising: it’s fast and doesn’t render artifacts to the screen. But I decided to not rush it into 4.4 as there are still some minor glitches around the decoration shadows which render the nice Oxygen glow useless. As well the blurring is not yet as nice as one produced by Krita. I will merge the branch as soon as trunk is open again and so we will have a blur effect in 4.5 again 🙂

But blurring is not the only OpenGL shader I started to work on this weekend: I started to implement a shader to replace the complete fixed functionality rendering of KWin. Our current rendering uses lots of OpenGL 1 commands as we also want to support older hardware. We have some OpenGL 2 shaders like the blur which replace parts of the fixed functionality.

In OpenGL 3 the fixed functionality is deprecated, in OpenGL ES 2.0 it’s even completely removed and replaced by the programmable pipeline. So getting the rendering completely into a shader is a prerequisite for using the new awesome stuff of OpenGL 3 like geometry shaders as well for porting KWin to OpenGL ES.

So why porting to OpenGL ES? Well I would like to see KWin running on Hardware like the N900 🙂 I think that KWin although developed for the desktop would be a nice window manager for small devices. We have some outstanding effects and a great decoration API as well as a nice SVG decoration engine when you don’t want to write your own decoration. And of course we see that some projects use Clutter based window managers for their small screen systems and it would be nice to provide an alternative, a window manager which is rock solid and has been used with compositing enabled by default for now almost a year – in some distributions already since KDE 4.1. And last but not least optimizing for small devices is useful for desktop systems as well.

So after spending some hours hacking the basic window rendering is implemented in a shader and if the shader is bound no deprecated OpenGL functions are used. Not only the basic rendering is supported, but some effects like present windows, desktop grid or even cover switch (as long as not using multiple screens) work as well. Other effects like cube, all shader effects or important benchmarking tools like fps are completely broken 😉 (Nevertheless my completely unprofessional benchmark called “top” looks very promising – kwin is not shown any more when idling or just doing a few repaints).

I don’t know when I will have something that could be shared as my development time is currently very limited and I only work on KWin at weekends. As well for the OpenGL ES part it could be a problem that I don’t have any hardware 😉 For OpenGL 3 it’s no problem as the drivers I use support it. I hope to have it in a state to push to trunk when it gets unfrozen.

=-=-=-=-=
Powered by Blogilo

Desktop Grid with Present Windows

One effect to rule them all. One effect to find them,
one effect to bring them all and in the darkness bind them
in the Land of KWin where the Wobbliness lies.

I wanted to present a video of it, but recordmydesktop does not want to record my desktop. So here is only a screenshot of new KWin fun:

Von KWin

Desktop Grid uses Present Windows (if activated) to lay out the windows as you might know from the previews of GNOME Shell or Mac OS Spaces. In the not existing video you can see that dragging the windows from one desktop to the other is nice and smooth. As soon as the dragging starts the windows on the starting desktop will be rearranged and the window, which is being moved is, bound to the cursor. When dropping the window onto another desktop the windows start to rearrange immediately.

The Present Windows effect has a proxy which allows other effects to call some of the methods from Present Windows. So Desktop Grid uses the proxy to get the layout for a group of windows. The proxies are also used in other effects, e.g. Sliding Popups disables the Fade animation and CoverSwitch uses a proxy to get the thumbnail bar from BoxSwitch.

Other goodies from Present Windows like filtering or mouse actions are not used. Therefore the effects have to be merged to become the one effect to rule them all. (Yes The Lord of the Rings is currently again the book on my bedside table.)

=-=-=-=-=
Powered by Blogilo