The answers page

Kissing GateFeel free to ask more questions, but here are answers to the ones you asked already:

  • How would you make a Prelude theme? Answered here and now floating around the net.
  • Will the compositor ever be enabled by default? I’d like it to be.  There are apparently people it still doesn’t work for well, though.  Perhaps as newer hardware becomes more common this will become less likely.
  • Will there be new features in the compositor? Possibly.  It seems to be working fine now, and I don’t want Metacity turning into a knock-off of Compiz.  But I can imagine some kind of plugin-based thing happening in a wild handwavy future, and in the meantime plenty of people are asking whether the shadows can become adjustable.
  • What is Metacity’s role in GNOME Shell? GNOME Shell uses a fork of Metacity called Mutter (i.e. Metacity with Clutter).  Whether this will become the main Metacity in future, or whether the two will be developed in parallel, or whether it’ll be merged back upstream and have some way of controlling which control path is taken, is not yet decided.  I need to talk to the Mutter people more, anyway.
  • How about window matching? Raise your voice about option 2 of this list.
  • Can Metacity move the title bar from the tops of windows to the sides? Not in versions 1 or 2 of the theme format.  Maybe in version 3 this will be possible, if there was any use for it: it’d be a fairly simple change to the existing system.
  • Why not merge Metacity and KWin and have one über-window-manager? Because choice is good.  That’s why we have EWMH, so you can run KWin with GNOME or Metacity with KDE if you really want.  Trying to reduce choice in window managers, or desktop environments, or whatever, really ends up with the choice of The Non-Free Market Leaders versus Everyone Else, which really isn’t much of a choice.  (But we do talk to Luboš and the other WM maintainers, and they’re all fine people, and we’re not attempting to sabotage one another’s work.  We’re even holding the conferences in the same place this year, you know…)

Photo © Nick Ford, cc-by-nc-nd.

Dragging the window icon

Listen to this.

A user writes:

At the moment i’m trying to make a theme for metacity but I have no idea how I can make the document icon drag-able and to interact with the desktop environment i.e. drag to the desktop to save or to the trash to delete.

Firstly, let me thank you for being willing to work on developing the desktop.

To begin with, this idea was based on “Window Experiments”.  desrt developed this idea into a program called icanhasedit back in August, which worked by taking over the responsibility of drawing window decorations from the window manager.  That’s certainly one way of going about solving the problem, but it brings a whole raft of problems of its own.  So let’s assume we want to keep the decorator in the window manager here.

Secondly, there is nothing in Metacity corresponding to “the document icon” as such.  It happens that most themes draw the icon of the current window on the menu button– the button which shows the window menu when you click it.  Some themes do it other ways, though: for example, Atlanta draws the icon on the titlebar next to the window’s name.  But let’s assume what we want is for the menu button to be draggable.

So you need to implement drag-and-drop from the widget representing that button.  Once that’s done, you need to have a way to tell what should actually happen when the button is dragged somewhere.  The trouble is that Metacity doesn’t know much about what’s actually in the window: it knows the name and the icon and a few other things, but the actual content is the business of the application.  So you need to invent a way for the WM to tell the application that a drag is happening, and for the application to tell the WM what the data being dragged is, and what its type is.  Then you need to argue it out on wm-spec-list and then you need to get applications actually to implement it so it’s useful.

So: this is possible, but it’s complicated and probably not an ideal first project.  If you want to try solving it, please go ahead and I’ll give you what help I can.  If you’d rather do something easier first and ramp up to this, I can help you with that too.

Reminding us

cuddle cowTwo of you emailed me out of the blue today to remind me that GNOME bug 504692 has an unreviewed patch on it that you’d like looked at before the next unstable release.  Thank you!  This is a very good way of reminding me of such things, and I think that holds true for most maintainers: we get dozens of pieces of email a day from Bugzilla, and a personal note is a bit of a stronger push.

(That said, don’t overdo it; I’m drowning in email as it is.)

The patch needs me to set up dual screens to test it.  There was a joke earlier that there needed to be a collection to buy me a second screen, since all Metacity development is done on a laptop; I have now been lent a second screen.  However, for the next couple of days I’ll be unusually busy in the world of non-GNOME software, and then I need to figure out how to get Xinerama and so on working on the new setup. I shall, of course, keep you up to date with extreme punctiliousness.

Thanks for being such a friendly and helpful bunch of users.

Ask us

Someone asked on IRC whether there had been a Metacity blog post about a certain thing they were interested in. There hadn’t been, but they were interested in seeing one, and I wondered what else people would like to see. So, ask us some questions (presumably questions about Metacity; if you want to know the date of the original constitution of Colorado there’s always Wikipedia :) ). People might answer them in the comments, and some of them might grow up to be fully-fledged posts. Of course you can always email us, too.

We get letters: two projects

Nigel Tao writes:

Hello. I’ve been reading with great interest, and was wondering if you had any thoughts on my superswitcher program? People occasionally ask me if I’d push some of it upstream, which presumably means into metacity.

I asked which parts people wanted pushed upstream, and he said “the replacement of the existing alt-Tab behaviour”. I think this sort of behaviour replacement largely belongs in add-in programs like superswitcher and Devil’s Pie, for example, where they just use the EWMH to take over part of Metacity’s functionality, Metacity stays out of the way, and it makes Metacity a little bit simpler.

I think we should probably have some central place, maybe on, where we list add-in programs such as these. Your thoughts, gentle readers?

(Nigel also raises the question of whether ctrl-alt-left from workspace 1 should switch to workplace n, which I think has been raised before, but I can’t find a record of. Update: GNOME bug 89315 and about a million dupes.)

Meanwhile, gandalfn writes:


I see recently that Iain work to integrate compositing in metacity. I’ll also work on composite manager (outside metacity) which use cairo for rendering. I have implemented it outside metacity to preserve his
functionalities. My principal goal was to provide compositing in GNOME and on all platform. For that, CCM used cairo and his backends to render (Xrender/Glitz).

What about joining our efforts to provide compositing on GNOME ?

CCM is using GObject for object model design and provides a plugin system which can be used to add various effects. In the future, I’m planning to add a clutter backend, some means for other applications to interact with cairo-compmgr (especially accessibility applications), some cool plugins, etc.

Iain, and everyone else, what do you think? For myself, I think gandalfn’s compositor looks to be both more complicated (with a plugin system) and less finished than Iain’s, but as it grows we’ll see how it looks; even if/when Iain’s compositor is a standard shipping part of Metacity, it’ll be possible to turn it off and use another one, in the same way that Nigel’s been doing with superswitcher. Then if other compositors come along in the spirit of Metacity with good ideas, it’ll be possible to switch parts around and so on.

All email quoted by permission. Image: Stamp FR 387, Postverk Føroya; released to public domain.

Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported.