[mutter] window: Do not unfocus on new window
- From: Olivier Fourdan <ofourdan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] window: Do not unfocus on new window
- Date: Thu, 27 Oct 2016 15:22:26 +0000 (UTC)
commit 998d921d418a7e943ea16c02657588f868d50c91
Author: Olivier Fourdan <ofourdan redhat com>
Date: Wed Oct 19 13:43:38 2016 +0200
window: Do not unfocus on new window
mutter would remove focus from a toplevel when showing one of its
transient window which is not on top and not focused.
When using xdg_popup without grab as allowed in xdg_shell v6, the popup
wouldn't be focused, and if an intermediate event occurs before the
popup is shown, it's not placed on top either, which could randomly
trigger a loss of focus in the corresponding toplevel window.
Remove that special case, it doesn't make much sense to globally unset
focus when mapping a new window.
https://bugzilla.gnome.org/show_bug.cgi?id=773210
src/core/window.c | 22 +---------------------
1 files changed, 1 insertions(+), 21 deletions(-)
---
diff --git a/src/core/window.c b/src/core/window.c
index 458e2d7..e3e15cf 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -2267,27 +2267,7 @@ meta_window_show (MetaWindow *window)
( (!place_on_top_on_map && !takes_focus_on_map) ||
window_would_be_covered (window) )
) {
- if (meta_window_is_ancestor_of_transient (focus_window, window))
- {
- guint32 timestamp;
-
- timestamp = meta_display_get_current_time_roundtrip (window->display);
-
- /* This happens for error dialogs or alerts; these need to remain on
- * top, but it would be confusing to have its ancestor remain
- * focused.
- */
- meta_topic (META_DEBUG_STARTUP,
- "The focus window %s is an ancestor of the newly mapped "
- "window %s which isn't being focused. Unfocusing the "
- "ancestor.\n",
- focus_window->desc, window->desc);
-
- meta_display_focus_the_no_focus_window (window->display,
- window->screen,
- timestamp);
- }
- else
+ if (!meta_window_is_ancestor_of_transient (focus_window, window))
{
needs_stacking_adjustment = TRUE;
if (!window->placed)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]