diff options
author | Elijah Newren <newren@gmail.com> | 2005-02-06 17:01:41 +0000 |
---|---|---|
committer | Elijah Newren <newren@src.gnome.org> | 2005-02-06 17:01:41 +0000 |
commit | 459c6668fbfc1d3d5983b4cf96b384c5a682ca35 (patch) | |
tree | 3d845541c8b8d78fbcb9514de852241b3abce5da | |
parent | d11681e5050b9ddf37d211f09c07557bef374277 (diff) | |
download | metacity-459c6668fbfc1d3d5983b4cf96b384c5a682ca35.tar.gz |
Ignore xconfigurerequest events for stacking when it should be safe to do
2005-02-06 Elijah Newren <newren@gmail.com>
Ignore xconfigurerequest events for stacking when it should be
safe to do so. Again, thanks to Crispin Flowerday for the test
case. Thanks to KWin for the inspiration (and to Google for
indexing their source code). Fixes the other half of #166395.
* src/window.c: (meta_window_configure_request): if the
active_window is from a separate application than the one getting
the configure request and the net_wm_user_time of the active
window is later than that of the window getting the configure
request, then ignore the request.
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | src/window.c | 48 |
2 files changed, 50 insertions, 11 deletions
@@ -1,5 +1,18 @@ 2005-02-06 Elijah Newren <newren@gmail.com> + Ignore xconfigurerequest events for stacking when it should be + safe to do so. Again, thanks to Crispin Flowerday for the test + case. Thanks to KWin for the inspiration (and to Google for + indexing their source code). Fixes the other half of #166395. + + * src/window.c: (meta_window_configure_request): if the + active_window is from a separate application than the one getting + the configure request and the net_wm_user_time of the active + window is later than that of the window getting the configure + request, then ignore the request. + +2005-02-06 Elijah Newren <newren@gmail.com> + If activation requests are too old, set the demands_attention hint instead of actually activating. Thanks to Crispin Flowerday for the test case and for testing the patch. Fixes half of #166395. diff --git a/src/window.c b/src/window.c index 083a439a..529327d2 100644 --- a/src/window.c +++ b/src/window.c @@ -3820,18 +3820,44 @@ meta_window_configure_request (MetaWindow *window, */ if (event->xconfigurerequest.value_mask & CWStackMode) { - switch (event->xconfigurerequest.detail) + MetaWindow *active_window; + active_window = window->display->expected_focus_window; + if (meta_prefs_get_disable_workarounds ()) { - case Above: - meta_window_raise (window); - break; - case Below: - meta_window_lower (window); - break; - case TopIf: - case BottomIf: - case Opposite: - break; + meta_topic (META_DEBUG_STACK, + "%s sent an xconfigure stacking request; this is " + "broken behavior and the request is being ignored.\n", + window->desc); + } + else if (active_window && + !meta_window_same_application (window, active_window) && + XSERVER_TIME_IS_BEFORE (window->net_wm_user_time, + active_window->net_wm_user_time)) + { + meta_topic (META_DEBUG_STACK, + "Ignoring xconfigure stacking request from %s (with " + "user_time %lu); currently active application is %s (with " + "user_time %lu).\n", + window->desc, + window->net_wm_user_time, + active_window->desc, + active_window->net_wm_user_time); + } + else + { + switch (event->xconfigurerequest.detail) + { + case Above: + meta_window_raise (window); + break; + case Below: + meta_window_lower (window); + break; + case TopIf: + case BottomIf: + case Opposite: + break; + } } } |