summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Fourdan <ofourdan@redhat.com>2016-10-25 09:14:12 +0200
committerOlivier Fourdan <ofourdan@redhat.com>2016-10-27 17:27:40 +0200
commitc52808b30de0971d174b561319197f85ed8f551e (patch)
tree78a3d6033f860e0771399abb815c7f70e0bdc67b
parent5919a4a779f7882d5f967bf1359e476d6ef28f67 (diff)
downloadmutter-c52808b30de0971d174b561319197f85ed8f551e.tar.gz
wayland: do not explicitly focus xdg_popup
The keyboard focus semantics for non-grabbing xdg_shell v6 popups is pretty undefined. Same applies for subsurfaces, but in practice, subsurfaces never receive keyboard focus, so it makes sense to do the same for non-grabbing popups. https://bugzilla.gnome.org/show_bug.cgi?id=773210
-rw-r--r--src/wayland/meta-window-wayland.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/wayland/meta-window-wayland.c b/src/wayland/meta-window-wayland.c
index a497decc0..1e77692e9 100644
--- a/src/wayland/meta-window-wayland.c
+++ b/src/wayland/meta-window-wayland.c
@@ -117,6 +117,20 @@ static void
meta_window_wayland_focus (MetaWindow *window,
guint32 timestamp)
{
+ MetaWaylandSurface *surface = window->surface;
+ MetaWaylandSurfaceRoleShellSurface *shell_surface_role =
+ META_WAYLAND_SURFACE_ROLE_SHELL_SURFACE (surface->role);
+
+ /* The keyboard focus semantics for non-grabbing zxdg_shell_v6 popups
+ * is pretty undefined. Same applies for subsurfaces, but in practice,
+ * subsurfaces never receive keyboard focus, so it makes sense to
+ * do the same for non-grabbing popups.
+ *
+ * See https://bugzilla.gnome.org/show_bug.cgi?id=771694#c24
+ */
+ if (META_IS_WAYLAND_XDG_POPUP (shell_surface_role))
+ return;
+
meta_display_set_input_focus_window (window->display,
window,
FALSE,