Wed Jun 9 2010 Owen Taylor <otaylor@redhat.com> - 2.30.0-5 - Add a patch to fix confusion between windows (rhbz #533066) - Add additional tweeks no_focus_windows and new_windows_always_on_top preferences (gnome bz 599248, gnome bz 599261)
69 lines
2.7 KiB
Diff
69 lines
2.7 KiB
Diff
From 10c92eeae2fb4130cade27e1c2d631ef00019a2c Mon Sep 17 00:00:00 2001
|
|
From: Owen W. Taylor <otaylor@fishsoup.net>
|
|
Date: Wed, 23 Jun 2010 16:49:37 -0400
|
|
Subject: [PATCH 1/2] Exclude the current application from no_focus_windows setting
|
|
|
|
The idea of the no_focus_windows setting is to allow identifying
|
|
legacy application windows that are stealing focus from other
|
|
applications and suppress that behavior. Sometimes its not possible to
|
|
identify specific problem windows of an application and its
|
|
necessary to blanket add all windows of the application. In this
|
|
case no_focus_windows can disrupt the internal flow of focus
|
|
within the application.
|
|
|
|
On the assumption that apps internally handle focus correctly
|
|
and have been tested not to steal focus from themselves at
|
|
annoying times, we exclude windows of the the current application
|
|
from no_focus_windows.
|
|
|
|
https://bugzilla.gnome.org/show_bug.cgi?id=599248
|
|
---
|
|
src/core/window.c | 11 ++++++++++-
|
|
src/metacity.schemas.in.in | 3 +++
|
|
2 files changed, 13 insertions(+), 1 deletions(-)
|
|
|
|
diff --git a/src/core/window.c b/src/core/window.c
|
|
index cacc3eb..399bb42 100644
|
|
--- a/src/core/window.c
|
|
+++ b/src/core/window.c
|
|
@@ -1977,12 +1977,21 @@ window_state_on_map (MetaWindow *window,
|
|
gboolean *places_on_top)
|
|
{
|
|
gboolean intervening_events;
|
|
+ MetaWindow *focus_window;
|
|
|
|
/* A 'no focus' window is a window that has been configured in GConf
|
|
* to never take focus on map; typically it will be a notification
|
|
* window from a legacy app that doesn't support _NET_WM_USER_TIME.
|
|
+ *
|
|
+ * This doesn't apply to applications taking focus from themselves;
|
|
+ * the assumption is applications have been properly tested to internally
|
|
+ * handle focus properly.
|
|
*/
|
|
- if (meta_prefs_window_is_no_focus (window->title, window->res_class))
|
|
+ focus_window = window->display->focus_window;
|
|
+ if (focus_window &&
|
|
+ !meta_window_same_application (window, focus_window) &&
|
|
+ !meta_window_same_client (window, focus_window) &&
|
|
+ meta_prefs_window_is_no_focus (window->title, window->res_class))
|
|
intervening_events = TRUE;
|
|
else
|
|
intervening_events = intervening_user_event_occurred (window);
|
|
diff --git a/src/metacity.schemas.in.in b/src/metacity.schemas.in.in
|
|
index c42fa96..e0dec3d 100644
|
|
--- a/src/metacity.schemas.in.in
|
|
+++ b/src/metacity.schemas.in.in
|
|
@@ -123,6 +123,9 @@
|
|
WM_CLASS matches the shell-style glob pattern <glob>.
|
|
(and <expr> <expr>) (or <expr> <expr>) (not <expr): Boolean combinations
|
|
of expressions.
|
|
+
|
|
+ New windows from the current active application are unaffected by
|
|
+ this setting.
|
|
</long>
|
|
</locale>
|
|
</schema>
|
|
--
|
|
1.7.0.1
|
|
|