From f6f804013f36e8cb66e1b8da4552b39aa421b8ab Mon Sep 17 00:00:00 2001 From: Alexander Orzechowski Date: Sat, 24 Sep 2022 06:50:25 -0400 Subject: [PATCH] Check for existence of subcompositor We need this protocol --- main.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index d343c5b..03f9682 100644 --- a/main.c +++ b/main.c @@ -1226,8 +1226,18 @@ int main(int argc, char **argv) { wl_registry_add_listener(registry, ®istry_listener, &state); wl_display_roundtrip(state.display); - if (!state.compositor || !state.shm) { - swaylock_log(LOG_ERROR, "Missing wl_compositor or wl_shm"); + if (!state.compositor) { + swaylock_log(LOG_ERROR, "Missing wl_compositor"); + return 1; + } + + if (!state.subcompositor) { + swaylock_log(LOG_ERROR, "Missing wl_subcompositor"); + return 1; + } + + if (!state.shm) { + swaylock_log(LOG_ERROR, "Missing wl_shm"); return 1; }