From 89f67c5cf793bc69c7e5d5008829851069daa330 Mon Sep 17 00:00:00 2001 From: Marius Vlad Date: Wed, 1 Jun 2022 15:48:53 +0300 Subject: [PATCH] compositor: Perform activation from keybindings Now that we have common function that peforms surface activation (xdg-shell and input one) use it for touch and keyboard. Bug-AGL: SPEC-4413 Signed-off-by: Marius Vlad Change-Id: I325e33da4c48f2741a7bb8f5ac706f838f9dabc4 --- src/compositor.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/compositor.c b/src/compositor.c index 97f4f9b..49ee90d 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -1307,7 +1307,8 @@ activate_binding(struct weston_seat *seat, { struct weston_surface *focus_surface; struct weston_surface *main_surface; - struct ivi_surface *surface; + struct ivi_surface *ivi_surface; + struct ivi_shell_seat *ivi_seat = get_ivi_shell_seat(seat); if (!focus_view) return; @@ -1315,11 +1316,12 @@ activate_binding(struct weston_seat *seat, focus_surface = focus_view->surface; main_surface = weston_surface_get_main_surface(focus_surface); - surface = to_ivi_surface(main_surface); - if (!surface) + ivi_surface = to_ivi_surface(main_surface); + if (!ivi_surface) return; - weston_seat_set_keyboard_focus(seat, focus_surface); + if (ivi_seat) + ivi_shell_activate_surface(ivi_surface, ivi_seat, flags); } static void -- 2.16.6