From 8fe9a1c168b21d3f84587bf40816f3bdc085569f Mon Sep 17 00:00:00 2001 From: IoIxD Date: Wed, 20 May 2026 12:50:08 -0700 Subject: [PATCH] wayland: clean up destroyedWidgetsTableMutex remenants --- src/backend/wayland/wayland.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/backend/wayland/wayland.c b/src/backend/wayland/wayland.c index 9b96097..8625c60 100644 --- a/src/backend/wayland/wayland.c +++ b/src/backend/wayland/wayland.c @@ -10,14 +10,6 @@ wayland_call_table_t wl_call_tbl; MwBool MwWaylandVulkan = MwFALSE; #endif -static pthread_mutex_t destroyedWidgetsTableMutex; -/* - * So Wayland, bless its soul; it keeps using callbacks LONG after they should not only be destroyed but the widget doesn't even exist anymore. Naturally, this causes use after free. so we fight fire with fire in the worst code i've ever written: by storing the freed pointers here, we disallow wayland from ever using them again. if something else is created that takes this slot, we remove it from the table. - * - * TODO(IOI): FUCKING NO???? FIX THIS. - */ -static MwLL* destroyedWidgetsTable; - static int event_loop(MwLL handle); /* Recursively dispatch a resize event to a widget and its children */ @@ -749,10 +741,6 @@ static void MwLLDestroyImpl(MwLL handle) { MwLLWaylandFlush(handle); - pthread_mutex_lock(&destroyedWidgetsTableMutex); - arrput(destroyedWidgetsTable, handle); - pthread_mutex_unlock(&destroyedWidgetsTableMutex); - free(handle); }