diff options
author | 2018-10-16 10:50:56 +0100 | |
---|---|---|
committer | 2018-10-16 10:50:56 +0100 | |
commit | ac20690945f1cd44c4c22267c9e7a172ebcf5ba5 (patch) | |
tree | 994739d4ba8388d7a336ac825a618daf2274ec66 /swaylock | |
parent | Prevent duplicate workspace::focus events (diff) | |
parent | Merge pull request #2845 from colemickens/posix_clock (diff) | |
download | sway-ac20690945f1cd44c4c22267c9e7a172ebcf5ba5.tar.gz sway-ac20690945f1cd44c4c22267c9e7a172ebcf5ba5.tar.zst sway-ac20690945f1cd44c4c22267c9e7a172ebcf5ba5.zip |
Merge branch 'master' into set-set-raw-focus
Diffstat (limited to 'swaylock')
-rw-r--r-- | swaylock/main.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/swaylock/main.c b/swaylock/main.c index 27bcfe32..86dfd577 100644 --- a/swaylock/main.c +++ b/swaylock/main.c | |||
@@ -634,13 +634,9 @@ static int parse_options(int argc, char **argv, struct swaylock_state *state, | |||
634 | } | 634 | } |
635 | break; | 635 | break; |
636 | case 'v': | 636 | case 'v': |
637 | #if defined SWAY_GIT_VERSION && defined SWAY_GIT_BRANCH && defined SWAY_VERSION_DATE | 637 | fprintf(stdout, "swaylock version " SWAY_VERSION "\n"); |
638 | fprintf(stdout, "swaylock version %s (%s, branch \"%s\")\n", | 638 | exit(EXIT_SUCCESS); |
639 | SWAY_GIT_VERSION, SWAY_VERSION_DATE, SWAY_GIT_BRANCH); | 639 | break; |
640 | #else | ||
641 | fprintf(stdout, "version unknown\n"); | ||
642 | #endif | ||
643 | return 1; | ||
644 | case LO_BS_HL_COLOR: | 640 | case LO_BS_HL_COLOR: |
645 | if (state) { | 641 | if (state) { |
646 | state->args.colors.bs_highlight = parse_color(optarg); | 642 | state->args.colors.bs_highlight = parse_color(optarg); |
@@ -908,7 +904,11 @@ int main(int argc, char **argv) { | |||
908 | wl_list_init(&state.surfaces); | 904 | wl_list_init(&state.surfaces); |
909 | state.xkb.context = xkb_context_new(XKB_CONTEXT_NO_FLAGS); | 905 | state.xkb.context = xkb_context_new(XKB_CONTEXT_NO_FLAGS); |
910 | state.display = wl_display_connect(NULL); | 906 | state.display = wl_display_connect(NULL); |
911 | assert(state.display); | 907 | if (!state.display) { |
908 | sway_abort("Unable to connect to the compositor. " | ||
909 | "If your compositor is running, check or set the " | ||
910 | "WAYLAND_DISPLAY environment variable."); | ||
911 | } | ||
912 | 912 | ||
913 | struct wl_registry *registry = wl_display_get_registry(state.display); | 913 | struct wl_registry *registry = wl_display_get_registry(state.display); |
914 | wl_registry_add_listener(registry, ®istry_listener, &state); | 914 | wl_registry_add_listener(registry, ®istry_listener, &state); |