X Window Management - Jewel

If you stumbled here by mistake while looking for a comprehensive round-up of available window managers, please try the very good xwinman.org.

Quicklinks: Jewel C++ and Jewel ObjC

Background

As with all good projects, this one starts because I need to 'scratch an itch', so to speak. That itch is the need for a good window manager which I can use as the basis for a good user interface for my computer. I know that there are others out there, but I think they're all deficient in one way or another. If I had a week to write it down, I'd tell you all about it, but you're not my psychiatrist.

Once upon a time, there was a good window manager released by Frank Hale's sapphire project, but it wsa killed off for a rewrite that then moved too conservatively for my liking. This window manager started as a fully-patched version of Frank's aewm++, but it hopes to grow beyond that. Already, many improvements were made to the C++ code, including adoption of the STL.

Now we're about to make the big jump. The C++ code is being left behind and we're going to try a similar model in Objective-C, which some of us think is a much easier OO language for systems programming like this. There will be one last summary C++ release and then only bugfixes if really needed.

Here you will be able to find code for download, links to other useful sites and ideas about window management as it develops, in that order. First, a (old) screenshot is here: 200k image.

Design Goals

The aims are:-

  1. Each part should do one job and do it well;
  2. All functions should be accessed easily in an easy-to-remember way;
  3. All functions should be accessible from keyboard and other programs via standard protocols where possible;
  4. Try to make things easy first and then look good;
  5. All program code should be fully documented;
  6. There should be an easy user introduction guide.

If you want more detail about any of the ideas set out here, please ask on the mailing list. Basically, I believe that the window management system should be modular so that you can add, remove or exchange features and the ways they are provided as you see fit. When I say modular, I mean as seperate processes initially, rather than having to use dynamic loading or select what features to have at compile time. This should also make it very easy to debug new advanced features, because they will be prevented from killing the window manager by the brute force isolation.

The window manager is written in C++. How did we end up there? Well, I've reluctantly ruled out my normal programming language because we're interfacing with libraries that are basically C and the window manager is an important part of the system that should be kept as responsive as possible. Writing it in C is too much overhead, though, as there's a lot of metadata to keep track of and it's far too easy for a little memory leak to sneak in. The problem of keeping track of window objects while other interface objects act on them seems to map easily to an object-orientated programming approach, so an OO language based on C seems the logical choice. That leaves use Objective-C or C++. Objective-C is interesting and probably possible, but we've more talented C++ programmers to draw upon and it is more widespread at the moment, so C++ is where the journey is, for now at least. (Update: see above ;-) )

As to interface theories? I'll write more about them later. Suffice it to say that I'm looking for the best of many worlds to try to get something that's obvious enough that someone computer-literate but not necessarily X-literate can get started quite quickly, while still allowing all the features that advanced users want to make their life easier. A lot of the ideas come from years of following web usability work from W3C WAI, useit, asktog and others.

Some of my other ideas appear in the feature request tracker on the sapphire project page, which is nice. Keep watching for more developments. If any of them warrant a bit more explanation, I'll post it here.

Jewel C++

This started from aewm++ 1.0.16, but it has some additions which are yet to appear in the main codebase:

  1. Key bindings for common window manipulations (eg minimise) by David Lawrance Ramsey;
  2. Menu entries for manipulations and desktop switching by Brett Parker;
  3. Bug fix for clients setting bad resize increments by DLR;
  4. STL rewrite by Brett;
  5. Bug fix for skipping windows like ROX-Filer icons by Brett;
  6. Bug fix for Gnome hints by Frank;
  7. Complete rewrite of strut placement algorithm;
  8. fspanel takes DLR's better options and the clock updates after Frank's bug fix;
  9. Appbar now resizes to the pixmaps used and takes a config file parameter; DLR added more NET_WM and cleaned up SIGKILL handling;
  10. Makefiles now recurse and inherit;
  11. Focus handling overhaul by DLR;
  12. Mouse wheel handling by DLR;
  13. Improved icon menu by Brett;
  14. Binary renamed to jewel, documentation being written;

Here are the improvements I want in Jewel ObjC:

  1. All keybinded operations also on the window menu;
  2. Keybindings handled by their own application (used with keylaunch?) via events;
  3. Configuration file reading, probably in its own class via XrmGetResource et al;
  4. Command line parsing macros replaced with XrmParseCommand;
  5. Work nicely with external root menus;
  6. Some sort of pixmapped borders;
  7. Bug-free :)

I welcome patches from anyone to do these tasks, or suggestions of other features, or other patches. Please send them to the jewel-devel list.

Download the current source (23 August 2002, pm): jewel-0.12.40.tar.gz

Download the current unstable source (10 April 2003, pm): jewel-0.12.41pre2.tar.gz

Jewel ObjC

Brett has started work on this, apparently, while I clean up the web and my version control systems. I don't even know how to get the source yet. Please ask on the mailing list. As soon as I know, you'll see it here, too.

Other links

The place to get started with Objective C programming on GNU is the GNUstep project.

WindowC - This is a small scheme-based scripting language for controlling windows. It should work with most window managers, although not all seem to respond to all functions properly. Some small example scripts are included, although at least one causes one early window manager to leak. Keep a close eye on it when you try it out! Improvements in 0.8 include a few function name changes to be more scheme-like and some small improvements to the included demos. windowc-0.8.tar.gz

This website is copyright 2002 MJ Ray. All Rights Reserved. Please ask about reproduction rights if not explicitly stated.
Some photographs are from freeimages.co.uk DHD Photo Gallery and tsw.org.uk.
This site built in MzScheme with Bluefish, wily and GIMP.