Skip to content

Commit

Permalink
set display to null for race condition
Browse files Browse the repository at this point in the history
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
  • Loading branch information
zlice authored and brndnmtthws committed Sep 13, 2024
1 parent bfa1d49 commit 875c1af
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/x11.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
#include "x11.h"

#include <X11/X.h>
#include <X11/Xlibint.h>
#undef min
#undef max
#include <sys/types.h>

#include "common.h"
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 875c1af

Please sign in to comment.