diff --git a/swaylock/main.c b/swaylock/main.c index f2bb5c3eb..8ed8adf57 100644 --- a/swaylock/main.c +++ b/swaylock/main.c @@ -925,6 +925,11 @@ int main(int argc, char **argv) { } zwlr_input_inhibit_manager_v1_get_inhibitor(state.input_inhibit_manager); + if (wl_display_roundtrip(state.display) == -1) { + wlr_log(WLR_ERROR, "Exiting - failed to inhibit input:" + " is another lockscreen already running?"); + return 2; + } if (state.zxdg_output_manager) { struct swaylock_surface *surface;