void seat_init(struct server *server);
void seat_finish(struct server *server);
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,
uint32_t edges);
return;
}
if (prev_surface) {
- set_activated(wlr_seat->keyboard_state.focused_surface, false);
+ set_activated(prev_surface, false);
}
move_to_front(view);
draw_rect(&ddata, deco_box(view, LAB_DECO_PART_LEFT));
/* title */
- if (view->surface == seat_focused_surface())
+ struct wlr_seat *seat = view->server->seat.seat;
+ if (view->surface == seat->keyboard_state.focused_surface)
ddata.rgba = theme.window_active_title_bg_color;
else
ddata.rgba = theme.window_inactive_title_bg_color;
}
/* buttons */
- if (view->surface == seat_focused_surface()) {
+ if (view->surface == seat->keyboard_state.focused_surface) {
render_icon(&ddata, deco_box(view, LAB_DECO_BUTTON_CLOSE),
theme.xbm_close_active_unpressed);
render_icon(&ddata, deco_box(view, LAB_DECO_BUTTON_MAXIMIZE),
wlr_seat_keyboard_notify_enter(seat, surface, kb->keycodes,
kb->num_keycodes, &kb->modifiers);
}
-
-struct wlr_surface *
-seat_focused_surface(void)
-{
- return current_seat->seat->keyboard_state.focused_surface;
-}
wl_list_remove(&unmanaged->link);
wl_list_remove(&unmanaged->commit.link);
- if (seat_focused_surface() == xsurface->surface) {
+ struct wlr_seat *seat = unmanaged->server->seat.seat;
+ if (seat->keyboard_state.focused_surface == xsurface->surface) {
struct xwayland_unmanaged *u;
struct wl_list *list = &unmanaged->server->unmanaged_surfaces;
wl_list_for_each (u, list, link) {
if (!wlr_xwayland_or_surface_wants_focus(prev)) {
continue;
}
- struct wlr_seat *seat = unmanaged->server->seat.seat;
seat_focus_surface(seat, prev->surface);
return;
}