Created attachment 362895 [details]
Description of problem:
The option "raise_on_click", when disabled, prevents applications from changing the stacking order.
While this behavior may be in line with the description of the option in GConf, it does not sound right to correlate this option (wich is for user clicks) with intercepting XConfigureRequest() from the application.
Many legacy applications still use XRaiseWindow() or XConfigureWindow() to raise their windows and this should work unless "disable_workarrouds" is set (independently of "raise_on_click")
Version-Release number of selected component (if applicable):
metacity 2.16 (but also in current upstream)
Steps to Reproduce:
1. In Red Hat Enterprise Linux 5, run gconf-editor and unselect "raise_on_click" and set focus to "mouse" or "sloppy"
2. Run Thunderbird and open the the address book (control + 2)
3. Raise and focus the main window, keeping the addressbook window open but lowered and unfocused
4. Reopen the address book (either from menu "tools" -> "Address book" or with the shortcut "ctrl+2")
The addressbook is not raise and not focused
The addressbook is raised, maybe focused if the pointer is within the window.
In meta_window_configure_request() from src/window.c, if raise_on_click is not set, the request is ignored unconditionally:
if (event->xconfigurerequest.value_mask & CWStackMode)
active_window = window->display->expected_focus_window;
if (meta_prefs_get_disable_workarounds () ||
"%s sent an xconfigure stacking request; this is "
"broken behavior and the request is being ignored.\n",
This is not the same as bug 503522 (and actually prevent any fix for bug 503522 to work if raise_on_click is unset)
The attached patch from out customer removes that test for !meta_prefs_get_raise_on_click () so that the behavior is consistent even if raise_on_click is unset.
Please also not that the reproducer is with Thunderbird, although recent version of Thunderbird now rightfully use net_window_activate, but many legacy application (not EWMH compliant) are impacted by this issue.
I can't see any reason for the test being there in the first place; I'm pretty sure we can get this upstream, if not I'm OK carrying a non-upstream patch.
*** Bug 512163 has been marked as a duplicate of this bug. ***
built in dist-5E-qu-candidate as metacity-2.16.0-15.el5
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.