Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set display to null for race condition #2032

Merged
merged 1 commit into from
Sep 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Comment on lines +36 to +38
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Required on Void Linux - Author stated in related issue (#1939) the code doesn't compile without this include.

#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
Comment on lines +320 to +321
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dunst does this so it looks ok to me.

db = XrmGetStringDatabase((const char *)prop.value);
XrmSetDatabase(display, db);
}
Expand Down
Loading