From 9087782960496a271c184e9e2c913a38611139cd Mon Sep 17 00:00:00 2001 From: IoI_xD Date: Wed, 15 Apr 2026 15:23:55 -0700 Subject: [PATCH] wayland: fix DBUS_FUNC --- include/Mw/LowLevel/Wayland.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/Mw/LowLevel/Wayland.h b/include/Mw/LowLevel/Wayland.h index d4ebdef..6b2c08f 100644 --- a/include/Mw/LowLevel/Wayland.h +++ b/include/Mw/LowLevel/Wayland.h @@ -248,8 +248,9 @@ MwInline int wayland_load_funcs() { #define DBUS_FUNC(x) \ wl_call_tbl.x = MwDynamicSymbol(wl_call_tbl.dbus_lib, #x); \ - if(!x) { \ - fprintf(stderr, "[WARNING] Will not be able to detect dark theme: dbus function %s (libdbus-1.so) not found.\n", #x); \ + if(!wl_call_tbl.x) { \ + fprintf(stderr, "[WARNING] Will not be able to detect dark theme: dbus function %s not found.\n", #x); \ + dlclose(wl_call_tbl.dbus_lib); \ return 0; \ }