Skip to content

Commit 5a4d464

Browse files
committed
Check for existence of subcompositor
We need this protocol
1 parent 5d70710 commit 5a4d464

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

main.c

+12-2
Original file line numberDiff line numberDiff line change
@@ -1226,8 +1226,18 @@ int main(int argc, char **argv) {
12261226
wl_registry_add_listener(registry, &registry_listener, &state);
12271227
wl_display_roundtrip(state.display);
12281228

1229-
if (!state.compositor || !state.shm) {
1230-
swaylock_log(LOG_ERROR, "Missing wl_compositor or wl_shm");
1229+
if (!state.compositor) {
1230+
swaylock_log(LOG_ERROR, "Missing wl_compositor");
1231+
return 1;
1232+
}
1233+
1234+
if (!state.subcompositor) {
1235+
swaylock_log(LOG_ERROR, "Missing wl_subcompositor");
1236+
return 1;
1237+
}
1238+
1239+
if (!state.shm) {
1240+
swaylock_log(LOG_ERROR, "Missing wl_shm");
12311241
return 1;
12321242
}
12331243

0 commit comments

Comments
 (0)