From c6b1400b2263a14f3bf7e984f87a921db1198762 Mon Sep 17 00:00:00 2001 From: zlice Date: Wed, 11 Sep 2024 16:43:42 -0400 Subject: [PATCH] set display to null for race condition https://github.com/dunst-project/dunst/blob/master/src/x11/x.c#L499 looks to be the source of some code which now sets display to NULL for some type of race condition in X11. Xlibint.h allows for building on Void Linux but needs min/max undefined. closes #1939 --- src/x11.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/x11.cc b/src/x11.cc index deec6cbdf..f44d5d52d 100644 --- a/src/x11.cc +++ b/src/x11.cc @@ -33,6 +33,9 @@ #include "x11.h" #include +#include +#undef min +#undef max #include #include "common.h" @@ -314,6 +317,8 @@ void update_x11_resource_db(bool first_run) { XrmDestroyDatabase(db); } + // https://github.com/dunst-project/dunst/blob/master/src/x11/x.c#L499 + display->db = NULL; // should be new or deleted db = XrmGetStringDatabase((const char *)prop.value); XrmSetDatabase(display, db); }