Comment 3 for bug 3982

Revision history for this message
Kyzer (stuart-caie) wrote :

I can confirm this bug.

It occurs because of bad interaction between Metacity (the default Ubuntu window manager) and XEmacs.

When you press "maximise", Metacity tells XEmacs to resize its window to the correct size, in pixels. XEmacs does not resize to the size it is told to. It maximises to a multiple of the size of the fixed-width font.

Metacity is not impressed, and tells XEmacs again to resize to the correct size. XEmacs again does not resize to the size it is told to. And so this goes on indefinitely, as neither Metacity nor XEmacs is willing to back down.

The XEmacs developers initially blamed the window manager, but they later checked the ICCCM, and found they were in the wrong; the window manager has the absolute right to decide the window dimensions of a window. If it tells you to change to a particular size, you obey!

A patch was devised and accepted to CVS around 2004-12-15:
http://calypso.tux.org/pipermail/xemacs-beta/2004-December/004047.html
http://calypso.tux.org/pipermail/xemacs-beta/2004-December/004048.html

It was fixed "for real" on 2006-04-30: From the XEmacs src/ChangeLog:

2006-04-30 Stephen J. Turnbull <email address hidden>

 Move geometry management from EmacsFrameResize to x_set_frame_size.
 Should fix "metacity maximization" bug.
 Provide (deprecated, temporary) backward compatibility option.

 * EmacsFrame.c (EmacsFrameResize):
 * frame-x.c (x_set_frame_size):
 Move call of EmacsManagerChangeSize.
 Don't bogusly notify WM about size changes the WM asked for.

 * console-x.c (wedge-metacity): New builtin Boolean Lisp variable.
 * console-x-impl.h (wedge_metacity): Declare C variable.
 * console-x.c (vars_of_console_x): New function to initialize it.
 * symsinit.h (vars_of_console_x): declare it.
 * emacs.c (main_1): Call vars_of_console_x.

 * EmacsFrameP.h (struct EmacsFrame):
 * EmacsManager.c (EmacsManagerChangeSize):
 * EmacsShell-sub.c (SuperClassRootGeometryManager):
 * console-x-impl.h (wedge_metacity):
 Various comments, some improved documentation, mostly sad comments
 on the state of the art of Xt programming.

 * frame-x.c (defi): #undef it. (Random code cleanliness.)

This was eventually released in XEmacs 21.5.27, released 2006-05-16. This is a beta release.
http://www.xemacs.org/Releases/21.5.27.html

So the problem has been fixed upstream, at least in beta.

Currently, Feisty includes XEmacs 21.4.19, released 2006-01-28 and Gutsy includes XEmacs 21.4.20, released 2006-12-09. These are both stable releases rather than betas. Neither of these yet have the fix to make XEmacs work correctly with metacity.