From fa3488402ee13e55f3c9153706a969000df41c0d Mon Sep 17 00:00:00 2001 From: IoIxD Date: Sun, 26 Apr 2026 20:07:14 -0700 Subject: [PATCH] apologies to all niri users guess you can't use clipboard until we find that out --- src/backend/wayland.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/src/backend/wayland.c b/src/backend/wayland.c index 23079f6..715a988 100644 --- a/src/backend/wayland.c +++ b/src/backend/wayland.c @@ -437,14 +437,6 @@ static wayland_protocol_t* wl_data_device_manager_setup(MwU32 name, struct _MwLL wl_data_source_add_listener(wayland->clipboard_source.wl, &wl_data_source_listener, wayland); - while(!wayland->pointer_seat) { - if(wl_display_roundtrip(wayland->display) == -1) { - printf("roundtrip failed: %d\n", wl_display_get_error(wayland->display)); - raise(SIGTRAP); - return NULL; - } - } - if(wayland->pointer_seat) { setup_clipboard((MwLL)wayland, wayland->pointer_seat); } @@ -480,14 +472,6 @@ static wayland_protocol_t* zwp_primary_selection_device_manager_v1_setup(MwU32 n wayland->supports_zwp = MwTRUE; - while(!wayland->pointer_seat) { - if(wl_display_roundtrip(wayland->display) == -1) { - printf("roundtrip failed: %d\n", wl_display_get_error(wayland->display)); - raise(SIGTRAP); - return NULL; - } - } - if(wayland->pointer_seat) { setup_zwp_clipboard((MwLL)wayland, wayland->pointer_seat); } @@ -2437,6 +2421,9 @@ static MwLLPixmap MwLLCreatePixmapImpl(MwLL handle, unsigned char* data, int wid MwLLPixmap r = malloc(sizeof(*r)); (void)handle; + if(width >= INT16_MAX) width = INT16_MAX; + if(height >= INT16_MAX) height = INT16_MAX; + r->common.width = width; r->common.height = height; r->common.raw = malloc(4 * width * height);