summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeonardo Hernández Hernández <leohdz172@protonmail.com>2022-09-10 23:48:38 -0500
committerLeonardo Hernández Hernández <leohdz172@protonmail.com>2022-09-10 23:54:56 -0500
commitc8a9f634515cbf5a943a982bb4b603682c0eca22 (patch)
treeb37431fc1f1b2bbf5dfdb58c01a5324342d5bb86
parentfd67087a82d52f79cb3f02f9048ee4dd603fd8a6 (diff)
prior run the startup command start the backend
this allow use clients like wlr-randr in the startup command
-rw-r--r--dwl.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/dwl.c b/dwl.c
index be94832..09e60ec 100644
--- a/dwl.c
+++ b/dwl.c
@@ -1817,7 +1817,12 @@ run(char *startup_cmd)
die("startup: display_add_socket_auto");
setenv("WAYLAND_DISPLAY", socket, 1);
- /* Now that the socket exists, run the startup command */
+ /* Start the backend. This will enumerate outputs and inputs, become the DRM
+ * master, etc */
+ if (!wlr_backend_start(backend))
+ die("startup: backend_start");
+
+ /* Now that the socket exists and the backend is started, run the startup command */
if (startup_cmd) {
int piperw[2];
if (pipe(piperw) < 0)
@@ -1839,12 +1844,7 @@ run(char *startup_cmd)
signal(SIGPIPE, SIG_IGN);
printstatus();
- /* Start the backend. This will enumerate outputs and inputs, become the DRM
- * master, etc */
- if (!wlr_backend_start(backend))
- die("startup: backend_start");
-
- /* Now that outputs are initialized, choose initial selmon based on
+ /* At this point the outputs are initialized, choose initial selmon based on
* cursor position, and set default cursor image */
selmon = xytomon(cursor->x, cursor->y);