[mutter] window: Properly handle focusing override redirect windows
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] window: Properly handle focusing override redirect windows
- Date: Wed, 22 May 2013 17:46:38 +0000 (UTC)
commit df8234c5e37f4bf234cc895f703f8a1fdaeda3a1
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Wed May 1 17:37:50 2013 -0400
window: Properly handle focusing override redirect windows
If an app pops up an OR window and sets input focus to it, like
Steam does, we'll think the focus window is null, causing us to
think the app is not focused.
OR windows should not be special if they get input focus, where
the input focus would be set to NULL. Instead, the window should
be marked as focused.
https://bugzilla.gnome.org/show_bug.cgi?id=647706
src/core/display.c | 6 +-----
src/core/window.c | 7 ++++++-
2 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/src/core/display.c b/src/core/display.c
index 334c07c..a8f8913 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -1980,11 +1980,7 @@ handle_window_focus_event (MetaDisplay *display,
{
display->server_focus_window = event->event;
display->server_focus_serial = serial;
-
- if (window && window->override_redirect)
- focus_window = NULL;
- else
- focus_window = window;
+ focus_window = window;
}
else if (event->evtype == XI_FocusOut)
{
diff --git a/src/core/window.c b/src/core/window.c
index 9ed387e..5e450c6 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -7193,6 +7193,8 @@ meta_window_set_focused_internal (MetaWindow *window,
if (focused)
{
window->has_focus = TRUE;
+ if (window->override_redirect)
+ return;
/* Move to the front of the focusing workspace's MRU list.
* We should only be "removing" it from the MRU list if it's
@@ -7258,8 +7260,11 @@ meta_window_set_focused_internal (MetaWindow *window,
}
else
{
- meta_window_propagate_focus_appearance (window, FALSE);
window->has_focus = FALSE;
+ if (window->override_redirect)
+ return;
+
+ meta_window_propagate_focus_appearance (window, FALSE);
if (!window->attached_focus_window)
meta_window_appears_focused_changed (window);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]