Merge branch 'backport-0.19.3' into '0.19'

0.19.3 backports

See merge request wlroots/wlroots!5248
This commit is contained in:
Simon Zeni 2026-01-26 10:05:58 -05:00
commit d767ad0ff0
6 changed files with 18 additions and 4 deletions

View file

@ -36,6 +36,15 @@ static void handle_disable_seat(struct libseat *seat, void *data) {
static int libseat_event(int fd, uint32_t mask, void *data) {
struct wlr_session *session = data;
if (mask & (WL_EVENT_HANGUP | WL_EVENT_ERROR)) {
if (mask & WL_EVENT_ERROR) {
wlr_log(WLR_ERROR, "Failed to wait for libseat event");
} else {
wlr_log(WLR_INFO, "Failed to wait for libseat event");
}
wlr_session_destroy(session);
return 0;
}
if (libseat_dispatch(session->seat_handle, 0) == -1) {
wlr_log_errno(WLR_ERROR, "Failed to dispatch libseat");
wlr_session_destroy(session);

View file

@ -23,6 +23,7 @@ static struct wlr_shm_buffer *shm_buffer_from_buffer(
static void buffer_destroy(struct wlr_buffer *wlr_buffer) {
struct wlr_shm_buffer *buffer = shm_buffer_from_buffer(wlr_buffer);
wlr_buffer_finish(wlr_buffer);
munmap(buffer->data, buffer->size);
close(buffer->shm.fd);
free(buffer);

View file

@ -31,6 +31,7 @@ static bool buffer_get_dmabuf(struct wlr_buffer *wlr_buffer, struct wlr_dmabuf_a
static void buffer_destroy(struct wlr_buffer *wlr_buffer) {
struct wlr_udmabuf_buffer *buffer = wl_container_of(wlr_buffer, buffer, base);
wlr_buffer_finish(wlr_buffer);
wlr_dmabuf_attributes_finish(&buffer->dmabuf);
close(buffer->shm.fd);
free(buffer);

View file

@ -19,7 +19,7 @@ xdg-shell-protocol.h:
tinywl.o: tinywl.c xdg-shell-protocol.h
$(CC) -c $< -g -Werror $(CFLAGS) -I. -DWLR_USE_UNSTABLE -o $@
tinywl: tinywl.o
$(CC) $^ $> -g -Werror $(CFLAGS) $(LDFLAGS) $(LIBS) -o $@
$(CC) $^ -g -Werror $(CFLAGS) $(LDFLAGS) $(LIBS) -o $@
clean:
rm -f tinywl tinywl.o xdg-shell-protocol.h

View file

@ -134,8 +134,11 @@ static void virtual_pointer_axis_source(struct wl_client *client,
if (pointer == NULL) {
return;
}
pointer->axis_event[pointer->axis].pointer = &pointer->pointer;
pointer->axis_event[pointer->axis].source = source;
int n_axis = sizeof(pointer->axis_event) / sizeof(pointer->axis_event[0]);
for (int i = 0; i < n_axis; i++) {
pointer->axis_event[i].pointer = &pointer->pointer;
pointer->axis_event[i].source = source;
}
}
static void virtual_pointer_axis_stop(struct wl_client *client,

View file

@ -602,7 +602,7 @@ xcursor_build_fullname(const char *dir, const char *subdir, const char *file)
static const char *
xcursor_next_path(const char *path)
{
char *colon = strchr(path, ':');
const char *colon = strchr(path, ':');
if (!colon)
return NULL;