diff options
Diffstat (limited to 'libweston/input.c')
-rw-r--r-- | libweston/input.c | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/libweston/input.c b/libweston/input.c index e8c060eb..8f46698e 100644 --- a/libweston/input.c +++ b/libweston/input.c @@ -1297,21 +1297,6 @@ notify_motion_absolute(struct weston_seat *seat, } WL_EXPORT void -weston_seat_set_keyboard_focus(struct weston_seat *seat, - struct weston_surface *surface) -{ - struct weston_compositor *compositor = seat->compositor; - struct weston_keyboard *keyboard = weston_seat_get_keyboard(seat); - - if (keyboard) { - weston_keyboard_set_focus(keyboard, surface); - wl_data_device_set_keyboard_focus(seat); - } - - wl_signal_emit(&compositor->activate_signal, surface); -} - -WL_EXPORT void notify_button(struct weston_seat *seat, uint32_t time, int32_t button, enum wl_pointer_button_state state) { @@ -2763,3 +2748,22 @@ weston_seat_get_touch(struct weston_seat *seat) return NULL; } + +/** Sets the keyboard focus to the given surface + * + * \param seat The seat to query + */ +WL_EXPORT void +weston_seat_set_keyboard_focus(struct weston_seat *seat, + struct weston_surface *surface) +{ + struct weston_compositor *compositor = seat->compositor; + struct weston_keyboard *keyboard = weston_seat_get_keyboard(seat); + + if (keyboard) { + weston_keyboard_set_focus(keyboard, surface); + wl_data_device_set_keyboard_focus(seat); + } + + wl_signal_emit(&compositor->activate_signal, surface); +} |