neuswc

patched neuswc library (tracked)
git clone https://git.daat.foo/neuswc.git
Log | Files | Refs | README | LICENSE

commit 2fd33ae65046dd40dc7eb738a0d670597c46b568
parent ec71320c1c388020a8195be1c02ead381e3cffb8
Author: cowmonk <cowmonk@based.pt>
Date:   Wed, 25 Nov 2026 20:50:43 -0700

compositor.patch: additional changes from MICE

bug fixes

Diffstat:
Mlibswc/compositor.c | 4+++-
Mpatches/compositor.patch | 41++++++++++++++++++++++++++---------------
2 files changed, 29 insertions(+), 16 deletions(-)

diff --git a/libswc/compositor.c b/libswc/compositor.c @@ -1614,7 +1614,9 @@ compositor_create_view(struct surface *surface) { struct compositor_view *view; - view = malloc(sizeof(*view)); + /* zeroed: a field set only on request (a backdrop hook) must not be + * what the memory held before */ + view = calloc(1, sizeof(*view)); if (!view) { return NULL; diff --git a/patches/compositor.patch b/patches/compositor.patch @@ -40,7 +40,7 @@ index 65432bc..8d0e7bf 100644 #endif diff --git a/libswc/compositor.c b/libswc/compositor.c -index bb762f6..7056ed6 100644 +index bb762f6..f10bcee 100644 --- a/libswc/compositor.c +++ b/libswc/compositor.c @@ -107,6 +107,8 @@ handle_button(struct pointer_handler *handler, uint32_t time, @@ -652,7 +652,18 @@ index bb762f6..7056ed6 100644 return view ? &view->window->base : NULL; } -@@ -1443,7 +1631,8 @@ compositor_create_view(struct surface *surface) +@@ -1426,7 +1614,9 @@ compositor_create_view(struct surface *surface) + { + struct compositor_view *view; + +- view = malloc(sizeof(*view)); ++ /* zeroed: a field set only on request (a backdrop hook) must not be ++ * what the memory held before */ ++ view = calloc(1, sizeof(*view)); + + if (!view) { + return NULL; +@@ -1443,7 +1633,8 @@ compositor_create_view(struct surface *surface) view->buffer_offset_y = 0; view->visible = false; view->always_top = false; @@ -662,7 +673,7 @@ index bb762f6..7056ed6 100644 view->extents.x1 = 0; view->extents.y1 = 0; view->extents.x2 = 0; -@@ -1612,7 +1801,7 @@ compositor_view_set_border_width(struct compositor_view *view, +@@ -1612,7 +1803,7 @@ compositor_view_set_border_width(struct compositor_view *view, /* XXX: Damage above surface for transparent surfaces? */ @@ -671,7 +682,7 @@ index bb762f6..7056ed6 100644 /* Damage old extents to prevent leftover border artifacts */ if (view->visible && -@@ -1634,6 +1823,32 @@ compositor_view_set_border_width(struct compositor_view *view, +@@ -1634,6 +1825,32 @@ compositor_view_set_border_width(struct compositor_view *view, update(&view->base); } @@ -704,7 +715,7 @@ index bb762f6..7056ed6 100644 void compositor_view_set_border_color(struct compositor_view *view, uint32_t outcolor, uint32_t incolor) -@@ -1664,7 +1879,7 @@ compositor_view_set_decor(struct compositor_view *view, +@@ -1664,7 +1881,7 @@ compositor_view_set_decor(struct compositor_view *view, } decor_view_set(view, decor); @@ -713,7 +724,7 @@ index bb762f6..7056ed6 100644 update(&view->base); } -@@ -1778,6 +1993,7 @@ update_screen(struct screen *screen) +@@ -1778,6 +1995,7 @@ update_screen(struct screen *screen) return; } @@ -721,7 +732,7 @@ index bb762f6..7056ed6 100644 pixman_region32_init(&damage); pixman_region32_intersect_rect(&damage, &compositor.damage, geom->x, geom->y, geom->width, geom->height); -@@ -1866,10 +2082,23 @@ handle_motion(struct pointer_handler *handler, uint32_t time, wl_fixed_t fx, +@@ -1866,10 +2084,23 @@ handle_motion(struct pointer_handler *handler, uint32_t time, wl_fixed_t fx, return false; } @@ -746,7 +757,7 @@ index bb762f6..7056ed6 100644 return false; } -@@ -1887,7 +2116,7 @@ handle_button(struct pointer_handler *handler, uint32_t time, +@@ -1887,7 +2118,7 @@ handle_button(struct pointer_handler *handler, uint32_t time, int32_t x = wl_fixed_to_int(swc.seat->pointer->x); int32_t y = wl_fixed_to_int(swc.seat->pointer->y); @@ -755,7 +766,7 @@ index bb762f6..7056ed6 100644 pointer_set_focus(swc.seat->pointer, view); raise_window(view); -@@ -2046,6 +2275,31 @@ compositor_get_buffer(struct screen *screen) +@@ -2046,6 +2277,31 @@ compositor_get_buffer(struct screen *screen) return target->current_buffer; } @@ -787,7 +798,7 @@ index bb762f6..7056ed6 100644 struct wld_buffer * compositor_render_to_shm(struct screen *screen) { -@@ -2119,61 +2373,15 @@ compositor_render_to_shm(struct screen *screen) +@@ -2119,61 +2375,15 @@ compositor_render_to_shm(struct screen *screen) pixman_region32_fini(&source_region); } @@ -1053,7 +1064,7 @@ index d9602f4..4144a08 100644 if (send_fd(launch.socket, out_fd, request_iov, 1 + (size > 0)) == -1) { diff --git a/libswc/meson.build b/libswc/meson.build -index 15fa57a..03b195a 100644 +index ba29ddc..e1ef27b 100644 --- a/libswc/meson.build +++ b/libswc/meson.build @@ -3,6 +3,7 @@ install_headers('swc.h') @@ -1080,7 +1091,7 @@ index 15fa57a..03b195a 100644 'xdg_output.c', 'xdg_shell.c', -@@ -43,12 +46,16 @@ libswc_src = files( +@@ -42,12 +45,16 @@ libswc_src = files( xwayland.found() ? ['xserver.c', 'xwm.c'] : [], @@ -3339,7 +3350,7 @@ index fc0fa9a..b6b0c4c 100644 SWC_BINDING_KEY, SWC_BINDING_BUTTON, diff --git a/meson.build b/meson.build -index 356dcbc..79dee81 100644 +index b37d6fa..73f589e 100644 --- a/meson.build +++ b/meson.build @@ -39,15 +39,20 @@ requires_private = [ @@ -3384,7 +3395,7 @@ index 356dcbc..79dee81 100644 endif xwayland = video_backend == 'drm' \ ? dependency('xwayland', required: get_option('xwayland')) \ -@@ -124,6 +130,20 @@ if input_backend == 'libinput' +@@ -121,6 +127,20 @@ if input_backend == 'libinput' requires_private += [libinput, udev] endif @@ -3405,7 +3416,7 @@ index 356dcbc..79dee81 100644 subdir('protocol') subdir('cursor') subdir('launch') -@@ -139,7 +159,8 @@ endif +@@ -136,7 +156,8 @@ endif summary({ 'Xwayland support': xwayland.found(),