[mutter] display: Don't focus the no-focus-window when sending WM_TAKE_FOCUS to a globally active window
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] display: Don't focus the no-focus-window when sending WM_TAKE_FOCUS to a globally active window
- Date: Tue, 29 Oct 2013 20:26:15 +0000 (UTC)
commit b82784ee46f05d6c42d6dc529222d42524e1cdc6
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Wed Oct 16 22:33:47 2013 -0400
display: Don't focus the no-focus-window when sending WM_TAKE_FOCUS to a globally active window
Clients like on-screen keyboards try not to take focus when the user clicks
on their window by setting the Input hint to false. However, due to GTK+ and
GDK bugs, the public API for setting the Input hint to false don't remove
WM_TAKE_FOCUS from WM_PROTOCOLS, unintentionally putting them into Globally
Active mode.
These clients also expect that since they don't want to take focus, they want
the focus to remain on the existing window. In this case, for clients like
on-screen keyboards, it's so they can send synthesized keyboard events to the
focused window.
https://bugzilla.gnome.org/show_bug.cgi?id=710296
src/core/display.c | 19 -------------------
1 files changed, 0 insertions(+), 19 deletions(-)
---
diff --git a/src/core/display.c b/src/core/display.c
index 7b14119..c6620ac 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -5730,25 +5730,6 @@ meta_display_request_take_focus (MetaDisplay *display,
meta_topic (META_DEBUG_FOCUS, "WM_TAKE_FOCUS(%s, %u)\n",
window->desc, timestamp);
- if (window != display->focus_window)
- {
- /* The "Globally Active Input" window case, where the window
- * doesn't want us to call XSetInputFocus on it, but does
- * want us to send a WM_TAKE_FOCUS.
- *
- * We can't just set display->focus_window to @window, since we
- * we don't know when (or even if) the window will actually take
- * focus, so we could end up being wrong for arbitrarily long.
- * But we also can't leave it set to the current window, or else
- * bug #597352 would come back. So we focus the no_focus_window
- * now (and set display->focus_window to that), send the
- * WM_TAKE_FOCUS, and then just forget about @window
- * until/unless we get a FocusIn.
- */
- meta_display_focus_the_no_focus_window (display,
- window->screen,
- timestamp);
- }
meta_window_send_icccm_message (window,
display->atom_WM_TAKE_FOCUS,
timestamp);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]