aboutsummaryrefslogtreecommitdiffstats
path: root/swaybar/bar.c
diff options
context:
space:
mode:
authorLibravatar Ian Fan <ianfan0@gmail.com>2018-10-16 10:50:56 +0100
committerLibravatar GitHub <noreply@github.com>2018-10-16 10:50:56 +0100
commitac20690945f1cd44c4c22267c9e7a172ebcf5ba5 (patch)
tree994739d4ba8388d7a336ac825a618daf2274ec66 /swaybar/bar.c
parentPrevent duplicate workspace::focus events (diff)
parentMerge pull request #2845 from colemickens/posix_clock (diff)
downloadsway-ac20690945f1cd44c4c22267c9e7a172ebcf5ba5.tar.gz
sway-ac20690945f1cd44c4c22267c9e7a172ebcf5ba5.tar.zst
sway-ac20690945f1cd44c4c22267c9e7a172ebcf5ba5.zip
Merge branch 'master' into set-set-raw-focus
Diffstat (limited to 'swaybar/bar.c')
-rw-r--r--swaybar/bar.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/swaybar/bar.c b/swaybar/bar.c
index be290c18..0deba72d 100644
--- a/swaybar/bar.c
+++ b/swaybar/bar.c
@@ -586,7 +586,11 @@ bool bar_setup(struct swaybar *bar, const char *socket_path) {
586 } 586 }
587 587
588 bar->display = wl_display_connect(NULL); 588 bar->display = wl_display_connect(NULL);
589 assert(bar->display); 589 if (!bar->display) {
590 sway_abort("Unable to connect to the compositor. "
591 "If your compositor is running, check or set the "
592 "WAYLAND_DISPLAY environment variable.");
593 }
590 594
591 struct wl_registry *registry = wl_display_get_registry(bar->display); 595 struct wl_registry *registry = wl_display_get_registry(bar->display);
592 wl_registry_add_listener(registry, &registry_listener, bar); 596 wl_registry_add_listener(registry, &registry_listener, bar);