2.25.8 released

What is it ?
Metacity is a simple compositing window manager that integrates nicely with GNOME 2.

What’s changed ?
Thanks to Brian Cameron, Maxim Ermilov, Daniel Macks, Elijah Newren, Frederic Peters, Thomas Thurman, David Trowbridge, and Olav Vitters for improvements in this version.

  • Reorder compiler flags (Daniel ) (GNOME bug #562033)
  • Fix compositor switch (Daniel ) (GNOME bug #560990)
  • Remove spurious warnings about operations on window “none” (Thomas)
  • Fix _POSIX_C_SOURCE which was breaking OS X builds (Thomas ) (GNOME bug #561962)
  • -Werror -Wall and -ansi are now standard compile flags (Thomas)
  • Merge screen and window keybindings files; fix minor alt-tab bug in the process (Thomas ) (GNOME bug #528337)
  • Remove some deprecated calls (Thomas ) (GNOME bug #560445)
  • Clean up #includes (Maxim ) (GNOME bug #560449)
  • Update description of raise_on_click (Elijah)
  • First dialogue delegated to zenity (Thomas)
  • fix theme-parser typo (Olav)
  • double-quote variable names in messages (Thomas ) (GNOME bug #558309)
  • fix accidental renaming of run_command_terminal (Thomas ) (GNOME bug #557943)
  • some null checks; problems exposed by new GDM (Brian ) (GNOME bug #558058)
  • ignore mouse button modifier if it’s missing (Thomas ) (Launchpad bug #258054, Launchpad bug #266929)
  • fix docbook markup (Frederic)

Astur (ast), Jorge González (es), Thomas Thurman (la), Leonardo Ferreira Fontenelle (pt_BR), Daniel Nylander (sv)

Where can I get it ?

  • da7fabe176eb971516a5d56bd6f3633b  bz2
  • 1c74488bd59b1876f4dd34a5f736ba0b  gz

2008-11-23: Metacity Journal


  • GNOME bug 550670 led to the discovery of GNOME bug 561911, which is also possibly related to GNOME bug 513944, that errors happen because of graphics contexts being of different depths.
  • Launchpad bug 296757: gdesklets and Metacity’s compositor apparently don’t play nicely.
  • GNOME bug 344072: It has been suggested that alt-Esc should be removed, and alt-Tab should depend on the state of the reduced_resources flag: if it’s TRUE, it behaves as alt-Esc does now, with no popup, and if FALSE, it behaves as alt-Tab does at present.  Gentle reader, what do you think?
  • GNOME bug 99335: Should ctrl-alt-del bring up some kind of logout dialogue?  (It does on Ubuntu.)
  • GNOME bug 560990: Compilation without the compositor turned on is broken in various ways.  This needs fixing soon.
  • GNOME bug 351647: Some kind of command-line option to choose which screens Metacity comes up on might be a good idea.

Things that need writing

Thomas has been working on a test suite for a while, but it’s not ready yet.

Also, before Vectacity gets anywhere near usable, we need to start with an editor.

Around the blogs

2008-11-11: fullscreen, focus and so on

Listen to this.

Welcome back, gentle reader, to the Metacity Journal, which now talks to you over your cornflakes.  This may not be a long-term feature, but your chronicler thought it worth trying.

It’s been a quiet few days in the world of Metacity, but here’s the latest news.  As ever, feel free to dive in on any of the bugs mentioned.

The recent post about why window matching is currently impossible brings up a chicken-and-egg question.  The window manager doesn’t do window matching because it’s nearly impossible, since windows don’t identify themselves, but windows don’t identify themselves because there’s no need, since the window manager doesn’t support it.  Perhaps adding window matching as an experimental option would help persuade people to add the GTK call to enable window matching in their programs.  Meanwhile, Thomas has suggested making these changes as a new GNOME Goal.

There has been some offlist discussion about reviving Vectacity, the SVG-based branch.  This would make theme editing a fair amount simpler.

Recent bugs

  • GNOME bug 560142: AisleRiot and Metacity arguing over fullscreen mode.
  • GNOME bug 533277: session restoration problems
  • GNOME bug 524468: problem with the screenshot button reported; Thomas cannot reproduce it
  • GNOME bug 487356: there are focus issues if a buried window is fullscreen.  This is quite important to fix and is currently at the top of the hitlist.

Around the blogs

And that’s all until next time.

Window matching

glass pane, shatteredWindow matching is the process of identifying a new window as one we’ve seen before.  Of course every new window is new, and so we’ve never seen it before, but there’s an intuitive understanding that if you open a document in OpenOffice and then come back to it a week later that the window is in some way the same.

Some good properties to use for this are:

  • SM_CLIENT_ID, which is set by the session manager for a particular instance of a running program. XSMP says that “a unique value called a client-ID is provided by the protocol for the purpose of disambiguating multiple instantiations of clients.”
  • WM_WINDOW_ROLE, which is optional.  The ICCCM says that “the combination of SM_CLIENT_ID and WM_WINDOW_ROLE can be used by other clients to uniquely identify a window across sessions.”  If there is no WM_WINDOW_ROLE, the ICCCM tells us to fall back on WM_CLASS and WM_NAME…
  • WM_NAME is the window title.
  • WM_CLASS is a two-part property.  Let’s call these Instance and Class, although these aren’t the real names. Instance is generally the name of the program, although it can sometimes be set on the commandline.
  • Class is “the general class of applications to which the client that owns this window belongs”, i.e. the brand name of the program (rather than “editor”).

Metacity does not currently do window matching for three good reasons.

1. Separation of concerns: in-process or not?

The EWMH allows us to do window matching outside the WM, and in fact this is what Devil’s Pie and gdevilspie are for.  They have all the other problems, but they’re not part of the WM, and if they crash they don’t bring the WM down.  It appears that because this can be done outside the WM it should be.  (Isn’t this fun?  We can pretend we’re the Hurd.)  Feel free to argue the point, of course.

2. Separation of concerns: app or WM?

It is also possible that nobody except the application itself knows where its windows should be placed, and that everything should be left up to the apps (and in practice the toolkits).  This would allow us to do away with session management entirely.  Certainly it would mean that it was none of Metacity’s business.

3. Paucity of distinguishability: who sets what?

Devil’s Pie requires you to set up rules to identify windows.  Doing window matching at the window manager level implies that the rules are written for you automatically.  This wouldn’t be a problem, except that applications set the attributes above very inconsistently.  Although WM_NAME is always set, it isn’t necessarily reliable– for example, gedit adds a star to it when you begin editing a document. I believe therefore that we cannot use it in automated window matching.

As to the others, let’s introduce a notation: Role|Instance|Class.  If Role is missing, we write [NONE]|Instance|Class.  Here is a program called same.c which will print these values for you.  Some common examples:

  • Firefox sets browser|Navigator|Firefox in all cases.  It is therefore not possible to distinguish Firefox windows from one another except by WM_NAME.
  • Thunderbird sets [NONE]|gecko|Thunderbird-bin, but it usually only has one window open.
  • nautilus sets [NONE]|nautilus|Nautilus and it is therefore impossible to tell the difference between Nautilus windows except by WM_NAME.
  • inkscape sets [NONE]|inkscape|Inkscape similarly.
  • gnome-calculator sets [NONE]|gnome-calculator|Gnome-calculator.
  • gnome-terminal sets gnome-terminal-SOME-LONG-STRING-OF-NUMBERS|gnome-terminal|Gnome-terminal with the string of numbers different each time.  This gets an A.
  • epiphany sets epiphany-window-SOME-LONG-STRING-OF-NUMBERS|epiphany-browser|Epiphany-browser with the numbers differing.  Another A.
  • The GIMP sets gimp-XXX|gimp|Gimp where XXX is “toolbox”, “dock”, “tip-of-the-day”, etc.  This gets an A+.

Please feel free to comment with more results and I’ll add them.


  • People often complain that Metacity doesn’t do window matching.
  • There are many reasons why it shouldn’t (but feel free to disagree in comments).
  • Window matching of any kind is needlessly difficult because the important properties are set inconsistently.
  • Therefore for the sake of window matching in general, whether we do it in Metacity or not, it would be a useful exercise to patch all programs which don’t set roles as well as the GIMP does.  (gtk_window_set_role() is the relevant GTK function; it’s not widely used.)  Perhaps this could become a GNOME Goal.

Photo: Glass pane, shattered, © nchenga nchenga, cc-by-nc.