From 97b6233d5039336567a28bcce3d714b18b483785 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tin=20=C5=A0vagelj?= Date: Mon, 26 Feb 2024 00:25:39 +0100 Subject: [PATCH] Add wlr layer shell check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Print a nicer error message if the compositor doesn't support wlr-layer-shell-unstable-v1 spec. Signed-off-by: Tin Å vagelj --- src/display-wayland.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/display-wayland.cc b/src/display-wayland.cc index 880b31d2..9693a466 100644 --- a/src/display-wayland.cc +++ b/src/display-wayland.cc @@ -576,6 +576,9 @@ bool display_output_wayland::initialize() { wl_registry_add_listener(wl_globals.registry, ®istry_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);