mirror of
https://codeberg.org/FabricSoul/dwl.git
synced 2025-08-03 20:10:23 -04:00
Handle missing XDG_RUNTIME_DIR explicitly
Also update the documentation to indicate that this is a Wayland thing and not dwl-specific.
This commit is contained in:
parent
f19d00b94a
commit
14063d58bb
2 changed files with 15 additions and 4 deletions
7
dwl.c
7
dwl.c
|
@ -1527,6 +1527,13 @@ main(int argc, char *argv[])
|
|||
goto usage;
|
||||
wlr_log_init(loglevel, NULL);
|
||||
|
||||
// Wayland requires XDG_RUNTIME_DIR for creating its communications
|
||||
// socket
|
||||
if (!getenv("XDG_RUNTIME_DIR")) {
|
||||
fprintf(stderr, "XDG_RUNTIME_DIR must be set\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/* The Wayland display is managed by libwayland. It handles accepting
|
||||
* clients from the Unix socket, manging Wayland globals, and so on. */
|
||||
dpy = wl_display_create();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue