From 37b1f86fa9f6e2a632389cedffa183563951a138 Mon Sep 17 00:00:00 2001 From: IoIxD Date: Mon, 28 Sep 2026 12:18:47 -0700 Subject: [PATCH] remove some bad comments --- src/backend/cairo.c | 14 +++++++------- src/backend/wayland/wayland.c | 1 - 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/backend/cairo.c b/src/backend/cairo.c index 4c6a0174..94d806d2 100644 --- a/src/backend/cairo.c +++ b/src/backend/cairo.c @@ -134,7 +134,6 @@ void MwLLCairoBackSetup(struct _MwLLCairo* cairo, MwU8* data, MwU32 width, MwU32 cairo->back_cairo = cairo_create(cairo->back_cs); } -/* Pointers are cleared so that destroying twice (or before any setup) is harmless; cairo ignores NULL. */ void MwLLCairoFrontDestroy(struct _MwLLCairo* cairo) { cairo_destroy(cairo->front_cairo); cairo_destroy(cairo->front_cairo_back); @@ -143,6 +142,7 @@ void MwLLCairoFrontDestroy(struct _MwLLCairo* cairo) { cairo_surface_destroy(cairo->front_cs_back); cairo_surface_destroy(cairo->frontbuffer_cs); + /* set all to null so that cairo ignores future destroys */ cairo->front_cairo = NULL; cairo->front_cairo_back = NULL; cairo->frontbuffer_cairo = NULL; @@ -229,8 +229,8 @@ static void MwLLFreeColorImpl(MwLLColor color) {} static MwBool lmao = MwFALSE; static int MwLLPendingImpl(MwLL handle) { - lmao = !lmao; - return lmao; + lmao = !lmao; + return lmao; } static void MwLLNextEventImpl(MwLL handle) { MwLLDispatch(handle, draw, NULL); @@ -274,10 +274,10 @@ static void MwLLRaiseImpl(MwLL handle) {} static void MwLLClipImpl(MwLL handle, MwRect* rect) {} static void MwLLSetupDragAndDropImpl(MwLL handle) {} static int MwLLCairoCallInitImpl(void) { - if(cairo_load_funcs() != 0) { - return 1; - } - return 0; + if(cairo_load_funcs() != 0) { + return 1; + } + return 0; } #include "call.c" CALL(Cairo); diff --git a/src/backend/wayland/wayland.c b/src/backend/wayland/wayland.c index 04bb8aa3..2cf42049 100644 --- a/src/backend/wayland/wayland.c +++ b/src/backend/wayland/wayland.c @@ -990,7 +990,6 @@ static void widget_setup(MwLL r, MwLL parent, int x, int y, int width, int heigh } } - /* widget_setup runs again on every state change, drop the regions from the last one */ if(r->wayland.region) wl_region_destroy(r->wayland.region); if(r->wayland.o_region) wl_region_destroy(r->wayland.o_region);