compositor: Perform activation from keybindings 95/27595/2
authorMarius Vlad <marius.vlad@collabora.com>
Wed, 1 Jun 2022 12:48:53 +0000 (15:48 +0300)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Fri, 10 Jun 2022 21:20:46 +0000 (21:20 +0000)
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 <marius.vlad@collabora.com>
Change-Id: I325e33da4c48f2741a7bb8f5ac706f838f9dabc4

src/compositor.c

index 97f4f9b..49ee90d 100644 (file)
@@ -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