summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2022-06-01 15:48:53 +0300
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2022-06-10 21:20:46 +0000
commit89f67c5cf793bc69c7e5d5008829851069daa330 (patch)
tree5c82f579b5eae45fc04035663a99490d8f40d57f
parent8cc1032b2f55420280c87e6b2a2bd7020b554394 (diff)
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 <marius.vlad@collabora.com> Change-Id: I325e33da4c48f2741a7bb8f5ac706f838f9dabc4
-rw-r--r--src/compositor.c10
1 files 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