• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

build-aux/H23-Oct-2021-17,11912,837

data/H03-May-2022-4,5474,003

doc/H03-May-2022-1,5071,287

libmetacity/H03-May-2022-16,64912,413

m4/H23-Oct-2021-12,88911,779

po/H03-May-2022-255,153210,902

src/H03-May-2022-67,55148,532

theme-viewer/H03-May-2022-6,9586,434

ABOUT-NLSH A D23-Oct-202191.8 KiB1,3801,341

AUTHORSH A D23-Oct-202133 21

COPYINGH A D23-Oct-202117.6 KiB341281

ChangeLogH A D23-Oct-2021521.1 KiB15,60610,594

HACKINGH A D23-Oct-202113.3 KiB285241

INSTALLH A D23-Oct-202115.4 KiB369287

Makefile.amH A D23-Oct-2021961 4640

Makefile.inH A D03-May-202229 KiB940838

NEWSH A D23-Oct-2021115.5 KiB3,0762,556

READMEH A D23-Oct-202117.7 KiB451333

aclocal.m4H A D23-Oct-202143.7 KiB1,2111,102

config.h.inH A D23-Oct-20214.2 KiB171118

configureH A D03-May-2022657.3 KiB22,51518,892

configure.acH A D23-Oct-202113.8 KiB431340

README

1Metacity is not a meta-City as in an urban center, but rather
2Meta-ness as in the state of being meta. i.e. metacity : meta as
3opacity : opaque. Also it may have something to do with the Meta key
4on UNIX keyboards.
5
6The first release of Metacity was version 2.3. Metacity has no need for
7your petty hangups about version numbers.
8
9The stable releases so far are 2.4.x, 2.6.x, 2.8.[01], 2.8.1.x, 2.8.5-,
102.10.x, 2.12.x, 2.14.x, 2.16.x.
11
12Unstable branches are 2.3.x, 2.5.x, 2.8.2-4, 2.9.x, 2.11.x, 2.13.x,
132.15.x, 2.17.x.
14
15COMPILING METACITY
16===
17
18You need GTK+ 2.2.  For startup notification to work you need
19libstartup-notification at
20http://www.freedesktop.org/software/startup-notification/ or on the
21GNOME ftp site.
22
23REPORTING BUGS AND SUBMITTING PATCHES
24===
25
26Report new bugs on http://bugzilla.gnome.org. Please check for
27duplicates, *especially* if you are reporting a feature request.
28
29Please do *not* add "me too!" or "yes I really want this!" comments to
30feature requests in bugzilla. Please read
31http://pobox.com/~hp/features.html prior to adding any kind of flame
32about missing features or misfeatures.
33
34Feel free to send patches too; Metacity is relatively small and
35simple, so if you find a bug or want to add a feature it should be
36pretty easy.  Send me mail, or put the patch in bugzilla.
37
38See the HACKING file for some notes on hacking Metacity.
39
40SHRINKING METACITY
41===
42
43Not that metacity is huge, but a substantial amount of code is in
44preferences handling, in static strings that aren't essential, and in
45the theme engine.
46
47You can strip about 70K from the metacity binary by compiling with
48options such as:
49
50 --disable-sm
51 --disable-verbose-mode
52 --disable-startup-notification
53
54However the result is no good for desktop use, all prefs have to be
55hardcoded in the binary, for example. If you wanted to make a really
56small metacity, here's some additional stuff you might consider
57implementing:
58
59 - add --disable-themes, which would replace theme.c and theme-parser.c
60   with a hardcoded implementation of the interface in theme.h,
61   should save about 80K. This should be fairly easy.
62
63 - add --disable-gtk, which would implement the interface in ui.h
64   without using GTK. This one is easier than you think because the
65   main part of the window manager doesn't use GTK directly, but is
66   still fairly hard to do.  You would probably have to give up some
67   of the features, such as window menus, as menus are pretty complex
68   to implement well.  So time may be better spent adding a GTK
69   configure script feature to build GTK with only a small core set of
70   functionality.
71
72METACITY FEATURES
73===
74
75 - Boring window manager for the adult in you. Many window managers
76   are like Marshmallow Froot Loops; Metacity is like Cheerios.
77
78 - Uses GTK+ 2.0 for drawing window frames. This means colors, fonts,
79   etc. come from GTK+ theme.
80
81 - Does not expose the concept of "window manager" to the user.  Some
82   of the features in the GNOME control panel and other parts of the
83   desktop happen to be implemented in metacity, such as changing your
84   window border theme, or changing your window navigation shortcuts,
85   but the user doesn't need to know this.
86
87 - Includes only the window manager; does not try to be a desktop
88   environment. The pager, configuration, etc. are all separate and
89   modular. The "libwnck" library (which I also wrote) is available
90   for writing metacity extensions, pagers, and so on. (But libwnck
91   isn't metacity specific, or GNOME-dependent; it requires only GTK,
92   and should work with KWin, fvwm2, and other EWMH-compliant WMs.)
93
94 - Has a simple theme system and a couple of extra themes come with it.
95   Change themes via gsettings:
96     gsettings set org.gnome.desktop.wm.preferences theme Crux
97     gsettings set org.gnome.desktop.wm.preferences theme Gorilla
98     gsettings set org.gnome.desktop.wm.preferences theme Atlanta
99     gsettings set org.gnome.desktop.wm.preferences theme Bright
100
101   Use metacity-theme-viewer to preview themes.
102
103 - Change number of workspaces via gsettings:
104     gsettings set org.gnome.desktop.wm.preferences num-workspaces 5
105
106   Can also change workspaces from GNOME 2 pager.
107
108 - Change focus mode:
109     gsettings set org.gnome.desktop.wm.preferences focus-mode mouse
110     gsettings set org.gnome.desktop.wm.preferences focus-mode sloppy
111     gsettings set org.gnome.desktop.wm.preferences focus-mode click
112
113 - Global keybinding defaults include:
114
115    Alt-Tab                forward cycle window focus
116    Alt-Shift-Tab          backward cycle focus
117    Alt-Ctrl-Tab           forward cycle focus among panels
118    Alt-Ctrl-Shift-Tab     backward cycle focus among panels
119    Alt-Escape             cycle window focus without a popup thingy
120    Ctrl-Alt-Left Arrow    previous workspace
121    Ctrl-Alt-Right Arrow   next workspace
122    Ctrl-Alt-D             minimize/unminimize all, to show desktop
123
124   Change keybindings for example:
125
126     gsettings set org.gnome.desktop.wm.keybindings switch_to_workspace_1 '<Alt>F1'
127
128   Also try the GNOME keyboard shortcuts control panel.
129
130 - Window keybindings:
131
132    Alt-space         window menu
133
134    Mnemonics work in the menu. That is, Alt-space then underlined
135    letter in the menu item works.
136
137    Choose Move from menu, and arrow keys to move the window.
138
139    While moving, hold down Control to move slower, and
140      Shift to snap to edges.
141
142    Choose Resize from menu, and nothing happens yet, but
143      eventually I might implement something.
144
145    Keybindings for things like maximize window, vertical maximize,
146    etc. can be bound, but may not all exist by default. See
147    metacity.schemas.
148
149 - Window mouse bindings:
150
151    Clicking anywhere on frame with button 1 will raise/focus window
152
153    If you click a window control, such as the close button, then the
154     control will activate on button release if you are still over it
155     on release (as with most GUI toolkits)
156
157    If you click and drag borders with button 1 it resizes the window
158
159    If you click and drag the titlebar with button 1 it moves the
160     window.
161
162    If you click anywhere on the frame with button 2 it lowers the
163     window.
164
165    If you click anywhere on the frame with button 3 it shows the
166     window menu.
167
168    If you hold down Super (windows key) and click inside a window, it
169     will move the window (buttons 1 and 2) or show menu (button 3).
170     Or you can configure a different modifier for this.
171
172    If you pick up a window with button 1 and then switch workspaces
173     the window will come with you to the new workspace, this is
174     a feature copied from Enlightenment.
175
176    If you hold down Shift while moving a window, the window snaps
177     to edges of other windows and the screen.
178
179 - Session management:
180
181    Metacity connects to the session manager and will set itself up to
182     be respawned. It theoretically restores sizes/positions/workspace
183     for session-aware applications.
184
185 - Metacity implements much of the EWMH window manager specification
186   from freedesktop.org, as well as the older ICCCM.  Please refer to
187   the COMPLIANCE file for information on metacity compliance with
188   these standards.
189
190 - Uses Pango to render text, so has cool i18n capabilities.
191   Supports UTF-8 window titles and such.
192
193 - There are simple animations for actions such as minimization,
194   to help users see what is happening. Should probably
195   have a few more of these and make them nicer.
196
197 - if you have the proper X setup, set the GDK_USE_XFT=1
198   environment variable to get antialiased window titles.
199
200 - considers the panel when placing windows and maximizing
201   them.
202
203 - handles the window manager selection from the ICCCM. Will exit if
204   another WM claims it, and can claim it from another WM if you pass
205   the --replace argument. So if you're running another
206   ICCCM-compliant WM, you can run "metacity --replace" to replace it
207   with Metacity.
208
209 - does basic colormap handling
210
211 - and much more! well, maybe not a lot more.
212
213HOW TO ADD EXTERNAL FEATURES
214===
215
216You can write a metacity "plugin" such as a pager, window list, icon
217box, task menu, or even things like "window matching" using the
218Extended Window Manager Hints. See http://www.freedesktop.org for the
219EWMH specification. An easy-to-use library called "libwnck" is
220available that uses the EWMH and is specifically designed for writing
221WM accessories.
222
223You might be interested in existing accessories such as "Devil's Pie"
224by Ross Burton, which add features to Metacity (or other
225EWMH-compliant WMs).
226
227METACITY BUGS, NON-FEATURES, AND CAVEATS
228===
229
230See bugzilla: http://bugzilla.gnome.org/query.cgi
231
232FAQ
233===
234
235Q: Will you add my feature?
236
237A: If it makes sense to turn on unconditionally, or is genuinely a
238   harmless preference that I would not be embarrassed to put in a
239   simple, uncluttered, user-friendly configuration dialog.
240
241   If the only rationale for your feature is that other window
242   managers have it, or that you are personally used to it, or
243   something like that, then I will not be impressed. Metacity is
244   firmly in the "choose good defaults" camp rather than the "offer 6
245   equally broken ways to do it, and let the user pick one" camp.
246
247   This is part of a "no crackrock" policy, despite some exceptions
248   I'm mildly embarrassed about. For example, multiple workspaces
249   probably constitute crackrock, they confuse most users and really
250   are not that useful if you have a decent tasklist and so on. But I
251   am too used to them to turn them off.  Or alternatively
252   iconification/tasklist is crack, and workspaces/pager are good. But
253   having both is certainly a bit wrong.  Sloppy focus is probably
254   crackrock too.
255
256   But don't think unlimited crack is OK just because I slipped up a
257   little. No slippery slope here.
258
259   Don't let this discourage patches and fixes - I love those. ;-)
260   Just be prepared to hear the above objections if your patch adds
261   some crack-ridden configuration option.
262
263   http://pobox.com/~hp/free-software-ui.html
264   http://pobox.com/~hp/features.html
265
266Q: Will Metacity be part of GNOME?
267
268A: It is officially part of GNOME as of GNOME 2.2. Prior to that,
269   it was unofficially shipped as the default GNOME WM by several
270   OS vendors.
271
272Q: Is Metacity a Red Hat project?
273
274A: Metacity's original creation was in no way funded, endorsed, or
275   encouraged by Red Hat, Inc. - I'm guessing Red Hat would not
276   consider "insufficient number of window managers for Linux" an
277   urgent problem. Just a wild guess though.
278
279   Now that metacity is the default WM however, Red Hat supports some
280   bugfixing and other work.
281
282Q: Why does Metacity remember the workspace/position of some apps
283   but not others across logout/login?
284
285A: Metacity only stores sizes/positions for apps that are session
286   managed. As far as I can determine, there is no way to attempt to
287   remember workspace/position for non-session-aware apps without
288   causing a lot of weird effects.
289
290   The reason is that you don't know which non-SM-aware apps were
291   launched by the session. When you initially log in, Metacity sees a
292   bunch of new windows appear. But it can't distinguish between
293   windows that were stored in your session, or windows you just
294   launched after logging in. If Metacity tried to guess that a window
295   was from the session, it could e.g. end up maximizing a dialog, or
296   put a window you just launched on another desktop or in a weird
297   place. And in fact I see a lot of bugs like this in window managers
298   that try to handle non-session-aware apps.
299
300   However, for session-aware apps, Metacity can tell that the
301   application instance is from the session and thus restore it
302   reliably, assuming the app properly restores the windows it had
303   open on session save.
304
305   So the correct way to fix the situation is to make apps
306   session-aware. libSM has come with X for years, it's very
307   standardized, it's shared by GNOME and KDE - even twm is
308   session-aware. So anyone who won't take a patch to add SM is more
309   archaic than twm - and you should flame them. ;-)
310
311   Docs on session management:
312    http://www.fifi.org/doc/xspecs/xsmp.txt.gz
313    http://www.fifi.org/doc/xspecs/SMlib.txt.gz
314
315   See also the ICCCM section on SM. For GNOME apps, use the
316   GnomeClient object. For a simple example of using libSM directly,
317   twm/session.c in the twm source code is pretty easy to understand.
318
319Q: How about adding viewports in addition to workspaces?
320
321A: I could conceivably be convinced to use viewports _instead_ of
322   workspaces, though currently I'm not thinking that. But I don't
323   think it makes any sense to have both; it's just confusing. They
324   are functionally equivalent.
325
326   You may think this means that you won't have certain keybindings,
327   or something like that. This is a misconception. The only
328   _fundamental_ difference between viewports and workspaces is that
329   with viewports, windows can "overlap" and appear partially on
330   one and partially on another. All other differences that
331   traditionally exist in other window managers are accidental -
332   the features commonly associated with viewports can be implemented
333   for workspaces, and vice versa.
334
335   So I don't want to have two kinds of
336   workspace/desktop/viewport/whatever, but I'm willing to add
337   features traditionally associated with either kind if those
338   features make sense.
339
340Q: Why is the panel always on top?
341
342A: Because it's a better user interface, and until we made this not
343   configurable a bunch of apps were not getting fixed (the app
344   authors were just saying "put your panel on the bottom" instead of
345   properly supporting fullscreen mode, and such).
346
347   rationales.txt has the bugzilla URL for some flamefesting on this,
348   if you want to go back and relive the glory.
349   Read these and the bugzilla stuff before asking/commenting:
350     http://pobox.com/~hp/free-software-ui.html
351     http://pobox.com/~hp/features.html
352
353Q: Why is there no edge flipping?
354
355A: This one is also in rationales.txt. Because "ouija board" UI, where
356   you just move the mouse around and the computer guesses what you
357   mean, has a lot of issues. This includes mouse focus, shade-hover
358   mode, edge flipping, autoraise, etc. Metacity has mouse focus and
359   autoraise as a compromise, but these features are all confusing for
360   many users, and cause problems with accessibility, fitt's law, and
361   so on.
362
363   Read these and the bugzilla stuff before asking/commenting:
364     http://pobox.com/~hp/free-software-ui.html
365     http://pobox.com/~hp/features.html
366
367Q: Why no XYZ?
368
369A: You are probably getting the idea by now - check rationales.txt,
370   query/search bugzilla, and read http://pobox.com/~hp/features.html
371   and http://pobox.com/~hp/free-software-ui.html
372
373   Then sit down and answer the question for yourself.  Is the feature
374   good? What's the rationale for it? Answer "why" not just "why not."
375   Justify in terms of users as a whole, not just users like
376   yourself. How else can you solve the same problem? etc. If that
377   leads you to a strong opinion, then please, post the rationale for
378   discussion to an appropriate bugzilla bug, or to
379   usability@gnome.org.
380
381   Please don't just "me too!" on bugzilla bugs, please don't think
382   flames will get you anywhere, and please don't repeat rationale
383   that's already been offered.
384
385Q: Your dumb web pages you made me read talk about solving problems in
386   fundamental ways instead of adding preferences or workarounds.
387   What are some examples where metacity has done this?
388
389A: There are quite a few, though many opportunities remain.  Sometimes
390   the real fix involves application changes. The metacity approach is
391   that it's OK to require apps to change, though there are also
392   plenty of workarounds in metacity for battles considered too hard
393   to fight.
394
395   Here are some examples:
396
397   - fullscreen mode was introduced to allow position constraints,
398     panel-on-top, and other such things to apply to normal windows
399     while still allowing video players etc. to "just work"
400
401   - "whether to include minimized windows in Alt+Tab" was solved
402     by putting minimized windows at the *end* of the tab order.
403
404   - Whether to pop up a feedback display during Alt+Tab was solved by
405     having both Alt+Tab and Alt+Esc
406
407   - Whether to have a "kill" feature was solved by automatically
408     detecting and offering to kill stuck apps. Better, metacity
409     actually does "kill -9" on the process, it doesn't just
410     disconnect the process from the X server. You'll appreciate this
411     if you ever did a "kill" on Netscape 4, and watched it keep
412     eating 100% CPU even though the X server had booted it.
413
414   - The workspaces vs. viewports mess was avoided by adding
415     directional navigation and such to workspaces, see discussion
416     earlier in this file.
417
418   - Instead of configurable placement algorithms, there's just one
419     that works fairly well most of the time.
420
421   - To avoid excess CPU use during opaque move/resize, we rate limit
422     the updates to the application window's size.
423
424   - Instead of configurable "show size of window while resizing,"
425     it's only shown for windows where it matters, such as terminals.
426     (Only use-case given for all windows is for web designers
427     choosing their web browser size, but there are web sites and
428     desktop backgrounds that do this for you.)
429
430   - Using startup notification, applications open on the workspace
431     where you launched them, not the active workspace when their
432     window is opened.
433
434   - and much more.
435
436Q: I think metacity sucks.
437
438A: Feel free to use any WM you like. The reason metacity follows the
439   ICCCM and EWMH specifications is that it makes metacity a modular,
440   interchangeable part in the desktop. libwnck-based apps such as the
441   GNOME window list will work just fine with any EWMH-compliant WM.
442
443Q: Did you spend a lot of time on this?
444
445A: Originally the answer was no. Sadly the answer is now yes.
446
447Q: How can you claim that you are anti-crack, while still
448   writing a window manager?
449
450A: I have no comment on that.
451