Skip to content

Sawfish users are people too

Wow, it’s been almost two months since my last post but well, now I’ve got something worth writing about.

I happen to be one of those strange people who still stubbornly uses sawfish, despite its minimally maintained state. Now is not a good time to be using an unmaintained window manager if you’re not prepared to get your hands dirty, what with all the eye candy developements as of late. Amit Gurdasani implemented ARGB visuals and I added support for basic opacity effects last year, but this is not enough for the emerging set of fancy widgets like Cairo Clock. These rely on shaped input to properly implement non-rectangular windows, and sawfish does not handle this situation well.

First, let me discuss how Metacity and Compiz handle shaped input. Metacity doesn’t directly address it, but support comes for free because windows that request not to have decorations do not get reparented into a frame window. As such, the input shape just works. Similarly, Compiz never reparents client windows – instead it draws decorations and peers of the client.

In contrast, sawfish always reparents managed windows into a frame – even if there are no decorations. This characteristic is assumed at many levels in the code, so it is not practical to implement the Metacity behaviour. Fortunately, there was another way: sawfish already carries over a window’s bounding shape when constructing the frame, so I made a change to carry the input shape over as well, and it works perfectly well. The only ugly thing is that there doesn’t appear to be any way to directly query whether input is shaped or not – I had to do it indirectly by counting the number of shape rectanges. Am I missing something?

My patch is not finished yet because it doesn’t do compile time and run time checks for XShape 1.1, but should be functionally complete.

Let’s see how many other sawfish users there still are out there :-)

Update:

This morning, I realised that it’s completely unnecessary to check if the client window is doing input shaping because a normal window has a window shape that exactly covers the window. This means that the logic that merges the client shape to the frame will still do the right thing for normal windows – even if the work is redundant. So I’ve updated the diff to remove the clunky checks. Now it’s much more elegant.

{ 5 } Comments

  1. James | 7th May 2006 at 23:38 | Permalink

    I’m a sawfish user too, however my problem is with deskbar windows not being aligned.

  2. Andrea | 8th May 2006 at 05:39 | Permalink

    In reply at James, i use Sawfish with the “center” placing windows method, so the deskbar child window appeared in the center of the screen, not so nice. So, for a workaround, i’ve added a “Matched Windows” rule for panel windows with “place-mode=none”… (=

  3. Ryan Paul | 8th May 2006 at 13:40 | Permalink

    I’m also a Sawfish user, and I just wanted to express my appreciation for you and everybody else that continues to improve Sawfish despite its largely unmaintained status. I’m hoping that Sawfish gets full Xgl compositing goodness eventually!

  4. David | 8th May 2006 at 14:42 | Permalink

    Bah! It’s all about ION2!!!

  5. Nolan | 9th May 2006 at 00:57 | Permalink

    I just want “pack-window-” to be xinerama aware. Well, that and I don’t want to write any LISP.