backend/wayland: factor out wlr_wl_seat

This commit is contained in:
Mykola Orliuk 2020-10-03 17:34:32 +02:00 committed by Simon Ser
parent df417b7e95
commit 1ac5257357
4 changed files with 88 additions and 48 deletions

View file

@ -586,8 +586,11 @@ struct wlr_output *wlr_wl_output_create(struct wlr_backend *wlr_backend) {
wlr_signal_emit_safe(&backend->backend.events.new_output, wlr_output);
if (backend->pointer != NULL) {
create_wl_pointer(backend->pointer, output);
struct wlr_wl_seat *seat = backend->seat;
if (seat != NULL) {
if (seat->pointer) {
create_wl_pointer(seat->pointer, output);
}
}
return wlr_output;