[mutter] wayland: Immediately give keyboard focus to Wayland popups
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] wayland: Immediately give keyboard focus to Wayland popups
- Date: Tue, 7 Oct 2014 00:05:54 +0000 (UTC)
commit 082cc9c83af0a7f90913e7dfd40585d077d0225a
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Mon Oct 6 16:58:39 2014 -0700
wayland: Immediately give keyboard focus to Wayland popups
src/wayland/meta-wayland-surface.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c
index 6581f54..0eb01d2 100644
--- a/src/wayland/meta-wayland-surface.c
+++ b/src/wayland/meta-wayland-surface.c
@@ -1067,6 +1067,7 @@ xdg_shell_get_xdg_popup (struct wl_client *client,
MetaWaylandSurface *parent_surf = wl_resource_get_user_data (parent_resource);
MetaWaylandSeat *seat = wl_resource_get_user_data (seat_resource);
MetaWindow *window;
+ MetaDisplay *display = meta_get_display ();
if (parent_surf == NULL || parent_surf->window == NULL)
return;
@@ -1085,7 +1086,7 @@ xdg_shell_get_xdg_popup (struct wl_client *client,
surface->xdg_shell_resource = resource;
- window = meta_window_wayland_new (meta_get_display (), surface);
+ window = meta_window_wayland_new (display, surface);
meta_window_move_frame (window, FALSE,
parent_surf->window->rect.x + x,
parent_surf->window->rect.y + y);
@@ -1096,6 +1097,7 @@ xdg_shell_get_xdg_popup (struct wl_client *client,
meta_wayland_surface_set_window (surface, window);
+ meta_window_focus (window, meta_display_get_current_time (display));
meta_wayland_pointer_start_popup_grab (&seat->pointer, surface);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]