diff options
| author | Ian Fan <ianfan0@gmail.com> | 2018-10-22 09:59:35 +0100 |
|---|---|---|
| committer | Ian Fan <ianfan0@gmail.com> | 2018-10-23 11:41:45 +0100 |
| commit | 4b312c1389ebc2ec73612bb4b9b4e7ea5f844f50 (patch) | |
| tree | 851a3fc9623a008218fc0f5f8f73820bab6c8b98 | |
| parent | 5521293dc7b01d1b87c13f27a28359376d619631 (diff) | |
swaylock: exit early if unable to inhibit input
This stops the program from going into a spinlock without exiting
| -rw-r--r-- | main.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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; |
