Skip to content

Commit

Permalink
Add wlr layer shell check
Browse files Browse the repository at this point in the history
Print a nicer error message if the compositor doesn't support
wlr-layer-shell-unstable-v1 spec.

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
  • Loading branch information
Caellian committed Feb 25, 2024
1 parent 56a81ef commit 1da6d30
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/display-wayland.cc
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,9 @@ bool display_output_wayland::initialize() {
wl_registry_add_listener(wl_globals.registry, &registry_listener, NULL);

wl_display_roundtrip(global_display);
if (wl_globals.layer_shell == nullptr) {
CRIT_ERR("Compositor doesn't support wlr-layer-shell-unstable-v1. Can't run conky.");
}

struct wl_surface *surface =
wl_compositor_create_surface(wl_globals.compositor);
Expand Down

0 comments on commit 1da6d30

Please sign in to comment.