input: Activate view no matter the keyboard focus
Activate a view even though it effectively may already be active.
Without this, in later patches, it won't be possibe to track what view
was activated by clicking last, as a view which surface already had
keyboard focus, won't be activated.
To keep avoiding sending xdg_surface.configure events, only change the
keyboard focus if the focus actually changed.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
diff --git a/libweston/input.c b/libweston/input.c
index 396267d..b9c79d4 100644
--- a/libweston/input.c
+++ b/libweston/input.c
@@ -2762,7 +2762,7 @@
struct weston_compositor *compositor = seat->compositor;
struct weston_keyboard *keyboard = weston_seat_get_keyboard(seat);
- if (keyboard) {
+ if (keyboard && keyboard->focus != surface) {
weston_keyboard_set_focus(keyboard, surface);
wl_data_device_set_keyboard_focus(seat);
}