GTK window manager...



I'd thought briefly a while ago about writing a GTK based window manager
for use with Gnome.  Considering a lot of people on the Gnome list have
expressed a desire for one recently, I've decided to sit down and try to
start coding it.  

The objective is to end up with a small program with only the features
that are absolutely needed. Most window managers are built for
standalone use so they duplicate many of the features that are available
in Gnome.

I would like to put in some degree of configurability - such as user
defined keybindings for circulating windows and desktops.  The window
frames themselves I would like to have an XML definition file,
compatible with those outputed by Glade, so that I could use libglade to
load them.

I don't plan on supporting root menus, leaving that to some external
program.  I may write it myself, but I would prefer if the gnome team
(hint hint :) seperated GMC into two seperate programs - the file
manager and a desktop manager to handle things like icons and root
menus.  

Likewise I don't plan on supporting application iconification.  Instead
I want to just unmap the window and add it to the save set and let that
be displayed by tasklist programs like gnome-pager or be pulled up with
a root menu click by the theoretical desktop manager.

The problem is this is the first major project I've set about to do.
I've got a fairly good idea of what I need to do, but I'm not entirely
sure how to do it.  

For putting the frame around windows, I'd think I should use a
SubStructureNotifyMask to catch CreateNotify events on the root window,
create a new frame and use the gdk_socket_steal to embed and reparent
the new window.  (Not entirely sure if I have to flush the CreateNotify
for the frame manually so it won't get caught in an infinite loop, I'm
going to have to look at the code a bit closer.)

Of course, if I'm doing a GTK event loop, I can't have my own loop to
poll the X event loop.  Unless I'm reading the code wrong, X events are
read through the GDK event queue rather than going direct to the X
queue, which means I have no way of snagging CirculateRequests,
CreateNotify, etc, etc...  Unless of course I'm missing something.

Any ideas on how to get around this or where I'm wrong would be
appreciated.

Matthew Berg



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]