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 <[email protected]>
  • Loading branch information
Caellian authored and brndnmtthws committed Feb 26, 2024
1 parent 62d86f2 commit 97b6233
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 97b6233

Please sign in to comment.