GNOME Bugzilla – Bug 335354
metacity doesn't handle _NET_WM_STATE_MODAL w/o WM_TRANSIENT_FOR
Last modified: 2006-03-21 16:43:39 UTC
Please describe the problem: From wm-spec: "_NET_WM_STATE_MODAL indicates that this is a modal dialog box. If the WM_TRANSIENT_FOR hint is set to another toplevel window, the dialog is modal for that window; if WM_TRANSIENT_FOR is not set or set to the root window the dialog is modal for its window group." The last part is where metacity fails (WM_TRANSIENT_FOR set to root or unset). If you set WM_TRANSIENT_FOR you get the effect that the window is above all others in the group, but it doesn't retain focus. Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information:
This also seems to be an issue for the Moneyplex suite (http://moneyplex.de/) which doesn't set WM_TRANSIENT_FOR for its dialogs.
I don't yet fully understand whether the problem is in the Spec or in the implementation, http://mail.gnome.org/archives/wm-spec-list/2003-December/msg00036.html may be related. In the case of Moneyplex mentioned in comment 1, the window type of a dialog is "_NET_WM_WINDOW_TYPE_NORMAL", which together with an unset TRANSIENT_FOR does not cause a focus when the dialog is shown, maybe the problem is in the stacking code.
It's definitely an implementation bug since metacity doesn't make the window modal even when WM_TRANSIENT_FOR is set [to root or None]. Personally, I would consider _NET_WM_STATE_MODAL to imply WM_TRANSIENT_FOR. There is no definition of "modal" in any of the specs, so its hard to say.
It's a known bug in Metacity, yes. Another good example is bug 312338 where metacity breaks nautilus too. Really needs to be fixed -- not just in metacity, but also the closely related bugs in libwnck and gtk+. *** This bug has been marked as a duplicate of 126489 ***