Re: extending metacity



Ar Mer, 2008-09-03 am 10:51 +1000, ysgrifennodd Michael Gratton:
> I'm interested in building a tabbed window manager, one that replaces
> the need for all application to each reimplement a tabbed UI.
> 
> Currently I use Metacity, because you know, it just works. So ideally
> this new WM would extend Metacity but provide some smarts around
> handling and displaying multiple matching windows.
> 
> I've noticed ubuntu ships a libmetacity package, so do you think it
> could be as "easy" as providing my own equivalent of core/main.c, or
> does metacity's implementation not let itself well to that sort of
> thing?

I was going to answer these in the order you asked them, but it'll be 
easier to answer them in reverse.

libmetacity-private is, well, private: it's there because the theme 
viewer links to it so the code isn't in there twice.  It's not designed 
to have other applications linking to it, even window managers;  I think 
there are programs out there which do, but the ABI is in no means 
guaranteed.

But most of the code you'd have to change isn't really around main.c 
anyway.  Especially, what needs doing is:

  1) You need a way to identify windows of the same type.  This is 
actually quite a tricky thing to do; there is a standard way to signal 
that your windows are all the same kind, but not all apps obey it-- even 
the ones you might expect to.  We do do this already, though, so you can 
piggyback off that.

  2) You need to modify the frame code so that it includes a tabbed 
notebook, and then to map and unmap the windows as appropriate when the 
user chooses a window.  This bit will be new.

If you work on this and get something working, though, I encourage you 
to discuss whether your changes should form a separate WM or be merged 
back into Metacity and have an on/off switch in GConf.

Thomas

-- 
Thomas Thurman, tthurman at gnome, http://blogs.gnome.org/tthurman
You're in a small chamber lit by an eerie green light. An extremely 
narrow tunnel exits to the west. A dark corridor leads northeast.


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