diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index 825c6c33..c125d556 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -5168,7 +5168,7 @@ activate(struct desktop_shell *shell, struct weston_surface *es, * Leave fullscreen surfaces on unrelated outputs alone. */ lower_fullscreen_layer(shell, shsurf->output); - weston_surface_activate(es, seat); + weston_seat_set_keyboard_focus(seat, es); state = ensure_focus_state(shell, seat); if (state == NULL) diff --git a/fullscreen-shell/fullscreen-shell.c b/fullscreen-shell/fullscreen-shell.c index ecaebfa0..14892586 100644 --- a/fullscreen-shell/fullscreen-shell.c +++ b/fullscreen-shell/fullscreen-shell.c @@ -89,7 +89,7 @@ pointer_focus_changed(struct wl_listener *listener, void *data) struct weston_pointer *pointer = data; if (pointer->focus && pointer->focus->surface->resource) - weston_surface_activate(pointer->focus->surface, pointer->seat); + weston_seat_set_keyboard_focus(pointer->seat, pointer->focus->surface); } static void @@ -118,7 +118,7 @@ seat_caps_changed(struct wl_listener *l, void *data) if (keyboard && keyboard->focus != NULL) { wl_list_for_each(fsout, &listener->shell->output_list, link) { if (fsout->surface) { - weston_surface_activate(fsout->surface, seat); + weston_seat_set_keyboard_focus(seat, fsout->surface); return; } } @@ -704,7 +704,7 @@ fullscreen_shell_present_surface(struct wl_client *client, weston_seat_get_keyboard(seat); if (keyboard && !keyboard->focus) - weston_surface_activate(surface, seat); + weston_seat_set_keyboard_focus(seat, surface); } } } @@ -755,7 +755,7 @@ fullscreen_shell_present_surface_for_mode(struct wl_client *client, weston_seat_get_keyboard(seat); if (keyboard && !keyboard->focus) - weston_surface_activate(surface, seat); + weston_seat_set_keyboard_focus(seat, surface); } } diff --git a/ivi-shell/ivi-shell.c b/ivi-shell/ivi-shell.c index 8bf3e80a..090ee4d1 100644 --- a/ivi-shell/ivi-shell.c +++ b/ivi-shell/ivi-shell.c @@ -445,7 +445,7 @@ activate_binding(struct weston_seat *seat, if (get_ivi_shell_surface(main_surface) == NULL) return; - weston_surface_activate(focus, seat); + weston_seat_set_keyboard_focus(seat, focus); } static void diff --git a/libweston/compositor.h b/libweston/compositor.h index 9e5155c6..5701a054 100644 --- a/libweston/compositor.h +++ b/libweston/compositor.h @@ -1167,8 +1167,8 @@ int weston_spring_done(struct weston_spring *spring); void -weston_surface_activate(struct weston_surface *surface, - struct weston_seat *seat); +weston_seat_set_keyboard_focus(struct weston_seat *seat, + struct weston_surface *surface); void notify_motion(struct weston_seat *seat, uint32_t time, struct weston_pointer_motion_event *event); diff --git a/libweston/input.c b/libweston/input.c index 08378d1e..e8c060eb 100644 --- a/libweston/input.c +++ b/libweston/input.c @@ -1297,8 +1297,8 @@ notify_motion_absolute(struct weston_seat *seat, } WL_EXPORT void -weston_surface_activate(struct weston_surface *surface, - struct weston_seat *seat) +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); diff --git a/tests/weston-test.c b/tests/weston-test.c index 1793744c..27d045d9 100644 --- a/tests/weston-test.c +++ b/tests/weston-test.c @@ -182,13 +182,13 @@ activate_surface(struct wl_client *client, struct wl_resource *resource, seat = get_seat(test); keyboard = weston_seat_get_keyboard(seat); if (surface) { - weston_surface_activate(surface, seat); + weston_seat_set_keyboard_focus(seat, surface); notify_keyboard_focus_in(seat, &keyboard->keys, STATE_UPDATE_AUTOMATIC); } else { notify_keyboard_focus_out(seat); - weston_surface_activate(surface, seat); + weston_seat_set_keyboard_focus(seat, surface); } }