Bug 526045 - Disabling "raise_on_click" prevents windows from changing stacking order
Summary: Disabling "raise_on_click" prevents windows from changing stacking order
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: metacity
Version: 5.4
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Owen Taylor
QA Contact: desktop-bugs@redhat.com
: 512163 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2009-09-28 13:49 UTC by Olivier Fourdan
Modified: 2018-10-27 15:03 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2010-03-30 08:25:36 UTC

Attachments (Terms of Use)
Proposed patch (591 bytes, patch)
2009-09-28 13:49 UTC, Olivier Fourdan
no flags Details | Diff

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2010:0245 normal SHIPPED_LIVE metacity bug fix and enhancement update 2010-03-29 12:44:04 UTC

Description Olivier Fourdan 2009-09-28 13:49:17 UTC
Created attachment 362895 [details]
Proposed patch

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)

How reproducible:

100% reproducible

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")
Actual results:

The addressbook is not raise and not focused

Expected results:

The addressbook is raised, maybe focused if the pointer is within the window.

Additional info:

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)
      MetaWindow *active_window;
      active_window = window->display->expected_focus_window;
      if (meta_prefs_get_disable_workarounds () ||
          !meta_prefs_get_raise_on_click ())

          meta_topic (META_DEBUG_STACK,
                      "%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.

Comment 1 Owen Taylor 2009-09-28 20:26:21 UTC
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.

Comment 2 Owen Taylor 2009-10-19 20:54:36 UTC
*** Bug 512163 has been marked as a duplicate of this bug. ***

Comment 3 Owen Taylor 2009-11-11 20:56:42 UTC
built in dist-5E-qu-candidate as metacity-2.16.0-15.el5

Comment 7 errata-xmlrpc 2010-03-30 08:25:36 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.