main: Increase access to per-client seats

websocket-tls
Andri Yngvason 2023-03-25 10:30:31 +00:00
parent c29bb465ee
commit 4700546026
1 changed files with 6 additions and 6 deletions

View File

@ -116,7 +116,7 @@ struct wayvnc_client {
struct wayvnc* server; struct wayvnc* server;
struct nvnc_client* nvnc_client; struct nvnc_client* nvnc_client;
struct wl_seat* seat; struct seat* seat;
unsigned id; unsigned id;
struct pointer pointer; struct pointer pointer;
@ -1111,10 +1111,10 @@ static void client_init_pointer(struct wayvnc_client* self)
self->pointer.pointer = pointer_manager_version >= 2 self->pointer.pointer = pointer_manager_version >= 2
? zwlr_virtual_pointer_manager_v1_create_virtual_pointer_with_output( ? zwlr_virtual_pointer_manager_v1_create_virtual_pointer_with_output(
wayvnc->pointer_manager, self->seat, wayvnc->pointer_manager, self->seat->wl_seat,
wayvnc->selected_output->wl_output) wayvnc->selected_output->wl_output)
: zwlr_virtual_pointer_manager_v1_create_virtual_pointer( : zwlr_virtual_pointer_manager_v1_create_virtual_pointer(
wayvnc->pointer_manager, self->seat); wayvnc->pointer_manager, self->seat->wl_seat);
if (pointer_init(&self->pointer) < 0) { if (pointer_init(&self->pointer) < 0) {
nvnc_log(NVNC_LOG_ERROR, "Failed to initialise pointer"); nvnc_log(NVNC_LOG_ERROR, "Failed to initialise pointer");
@ -1128,7 +1128,7 @@ static void client_init_seat(struct wayvnc_client* self)
if (wayvnc->disable_input) if (wayvnc->disable_input)
return; return;
self->seat = wayvnc->selected_seat->wl_seat; self->seat = wayvnc->selected_seat;
} }
static void client_init_keyboard(struct wayvnc_client* self) static void client_init_keyboard(struct wayvnc_client* self)
@ -1140,7 +1140,7 @@ static void client_init_keyboard(struct wayvnc_client* self)
self->keyboard.virtual_keyboard = self->keyboard.virtual_keyboard =
zwp_virtual_keyboard_manager_v1_create_virtual_keyboard( zwp_virtual_keyboard_manager_v1_create_virtual_keyboard(
wayvnc->keyboard_manager, self->seat); wayvnc->keyboard_manager, self->seat->wl_seat);
struct xkb_rule_names rule_names = { struct xkb_rule_names rule_names = {
.rules = wayvnc->cfg.xkb_rules, .rules = wayvnc->cfg.xkb_rules,
@ -1176,7 +1176,7 @@ static void client_init_data_control(struct wayvnc_client* self)
self->data_control.manager = wayvnc->data_control_manager; self->data_control.manager = wayvnc->data_control_manager;
data_control_init(&self->data_control, wayvnc->display, wayvnc->nvnc, data_control_init(&self->data_control, wayvnc->display, wayvnc->nvnc,
self->seat); self->seat->wl_seat);
} }
void log_selected_output(struct wayvnc* self) void log_selected_output(struct wayvnc* self)