diff --git a/main.c b/main.c index 5057da0..549d6f6 100644 --- a/main.c +++ b/main.c @@ -1205,6 +1205,7 @@ int main(int argc, char **argv) { "WAYLAND_DISPLAY environment variable."); return EXIT_FAILURE; } + state.eventloop = loop_create(); struct wl_registry *registry = wl_display_get_registry(state.display); wl_registry_add_listener(registry, ®istry_listener, &state); @@ -1269,7 +1270,6 @@ int main(int argc, char **argv) { daemonize(); } - state.eventloop = loop_create(); loop_add_fd(state.eventloop, wl_display_get_fd(state.display), POLLIN, display_in, NULL);