summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2022-06-01 15:18:06 +0300
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2022-06-10 21:20:46 +0000
commit8cc1032b2f55420280c87e6b2a2bd7020b554394 (patch)
treecc17b8e56dc9fdccf7697486eee73860d8042b68
parent9cccfe829aab45fd2ab8475127d62ff22c5fedee (diff)
compositor: Pass flags when adding keybindgs
Although we don't really use these flags make it so we deliever them to libweston. Bug-AGL: SPEC-4413 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Idbbf2278c5fcaf75a8ef2f89499f7815d4a9e88f
-rw-r--r--src/compositor.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/compositor.c b/src/compositor.c
index 2fb981b..97f4f9b 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -1303,18 +1303,23 @@ to_ivi_surface(struct weston_surface *surface)
static void
activate_binding(struct weston_seat *seat,
- struct weston_view *focus_view)
+ struct weston_view *focus_view, uint32_t flags)
{
- struct weston_surface *focus = focus_view->surface;
- struct weston_surface *main_surface =
- weston_surface_get_main_surface(focus);
+ struct weston_surface *focus_surface;
+ struct weston_surface *main_surface;
struct ivi_surface *surface;
+ if (!focus_view)
+ return;
+
+ focus_surface = focus_view->surface;
+ main_surface = weston_surface_get_main_surface(focus_surface);
+
surface = to_ivi_surface(main_surface);
if (!surface)
return;
- weston_seat_set_keyboard_focus(seat, focus);
+ weston_seat_set_keyboard_focus(seat, focus_surface);
}
static void
@@ -1327,7 +1332,8 @@ click_to_activate_binding(struct weston_pointer *pointer,
if (pointer->focus == NULL)
return;
- activate_binding(pointer->seat, pointer->focus);
+ activate_binding(pointer->seat, pointer->focus,
+ WESTON_ACTIVATE_FLAG_CLICKED);
}
static void
@@ -1340,7 +1346,8 @@ touch_to_activate_binding(struct weston_touch *touch,
if (touch->focus == NULL)
return;
- activate_binding(touch->seat, touch->focus);
+ activate_binding(touch->seat, touch->focus,
+ WESTON_ACTIVATE_FLAG_NONE);
}
static void