double *sy, int *view_area);
void cursor_init(struct seat *seat);
+
void keyboard_init(struct seat *seat);
+
void seat_init(struct server *server);
void seat_finish(struct server *server);
-void seat_focus_surface(struct wlr_surface *surface);
+void seat_focus_surface(struct wlr_seat *seat, struct wlr_surface *surface);
struct wlr_surface *seat_focused_surface(void);
void interactive_begin(struct view *view, enum cursor_mode mode,
desktop_focus_view(struct view *view)
{
if (!view) {
- seat_focus_surface(NULL);
+ seat_focus_surface(view->server->seat.seat, NULL);
return;
}
if (view->minimized) {
}
void
-seat_focus_surface(struct wlr_surface *surface)
+seat_focus_surface(struct wlr_seat *seat, struct wlr_surface *surface)
{
- struct wlr_seat *wlr_seat = current_seat->seat;
if (!surface) {
- wlr_seat_keyboard_notify_clear_focus(wlr_seat);
+ wlr_seat_keyboard_notify_clear_focus(seat);
return;
}
struct wlr_keyboard *kb = ¤t_seat->keyboard_group->keyboard;
- wlr_seat_keyboard_notify_enter(wlr_seat, surface, kb->keycodes,
+ wlr_seat_keyboard_notify_enter(seat, surface, kb->keycodes,
kb->num_keycodes, &kb->modifiers);
}
unmanaged->ly = xsurface->y;
if (wlr_xwayland_or_surface_wants_focus(xsurface)) {
- seat_focus_surface(xsurface->surface);
+ struct wlr_seat *seat = unmanaged->server->seat.seat;
+ seat_focus_surface(seat, xsurface->surface);
}
}
if (!wlr_xwayland_or_surface_wants_focus(prev)) {
continue;
}
- seat_focus_surface(prev->surface);
+ struct wlr_seat *seat = unmanaged->server->seat.seat;
+ seat_focus_surface(seat, prev->surface);
return;
}
}