Check for existence of subcompositor

We need this protocol
This commit is contained in:
Alexander Orzechowski 2022-09-24 06:50:25 -04:00 committed by Simon Ser
parent 5c1b16b957
commit f6f804013f

14
main.c
View File

@ -1226,8 +1226,18 @@ int main(int argc, char **argv) {
wl_registry_add_listener(registry, &registry_listener, &state); wl_registry_add_listener(registry, &registry_listener, &state);
wl_display_roundtrip(state.display); wl_display_roundtrip(state.display);
if (!state.compositor || !state.shm) { if (!state.compositor) {
swaylock_log(LOG_ERROR, "Missing wl_compositor or wl_shm"); 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; return 1;
} }