diff --git a/swayidle/main.c b/swayidle/main.c index 64e450364..678d622f0 100644 --- a/swayidle/main.c +++ b/swayidle/main.c @@ -1,22 +1,21 @@ #define _XOPEN_SOURCE 500 +#include #include -#include #include +#include #include #include -#include #include #include #include #include #include +#include #include #include #include -#include -#include -#include "idle-client-protocol.h" #include "config.h" +#include "idle-client-protocol.h" #include "list.h" #ifdef SWAY_IDLE_HAS_SYSTEMD #include @@ -36,7 +35,6 @@ struct swayidle_state { struct wl_display *display; struct org_kde_kwin_idle_timeout *idle_timer; struct org_kde_kwin_idle_timeout *lock_timer; - struct wlr_output_layout *layout; struct wl_event_loop *event_loop; list_t *timeout_cmds; } state; @@ -165,7 +163,7 @@ static int dbus_event(int fd, uint32_t mask, void *data) { void setup_sleep_listener() { struct sd_bus *bus; - + int ret = sd_bus_default_system(&bus); if (ret < 0) { wlr_log(WLR_ERROR, "Failed to open D-Bus connection: %s", @@ -360,7 +358,7 @@ static int display_event(int fd, uint32_t mask, void *data) { if (wl_display_dispatch(state.display) < 0) { wlr_log_errno(WLR_ERROR, "wl_display_dispatch failed, exiting"); sway_terminate(0); - }; + } return 0; } @@ -397,7 +395,6 @@ int main(int argc, char *argv[]) { struct wl_registry *registry = wl_display_get_registry(state.display); wl_registry_add_listener(registry, ®istry_listener, NULL); wl_display_roundtrip(state.display); - state.layout = wlr_output_layout_create(); state.event_loop = wl_event_loop_create(); if (idle_manager == NULL) {