aboutsummaryrefslogtreecommitdiff
path: root/wayland.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-11-07 10:29:25 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-11-07 10:29:25 +0000
commit0183e13f505c0afa7cea9eb5a0873d9596916fcb (patch)
treeb012f4382a49472f3dfe456aaeebff5899cc4ce0 /wayland.c
parentMerge branch 'xdga-launch' (diff)
wayland: error out if there aren’t any seats available
If there aren’t any seats available, input is not possible (neither keyboard nor mouse input). Note that this is not the same thing as e.g. no keyboard being plugged in. In this case, there will be a seat, but without the keybaord capability. Input may not be possible _right now_, but may be later, if the user plugs in a keyboard. Closes #779
Diffstat (limited to 'wayland.c')
-rw-r--r--wayland.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/wayland.c b/wayland.c
index 22e3d6dc..44157ab2 100644
--- a/wayland.c
+++ b/wayland.c
@@ -1238,6 +1238,10 @@ wayl_init(const struct config *conf, struct fdm *fdm)
"(wl_data_device_manager not implemented by server)");
goto out;
}
+ if (tll_length(wayl->seats) == 0) {
+ LOG_ERR("no seats available (wl_seat interface too old?)");
+ goto out;
+ }
if (wayl->primary_selection_device_manager == NULL)
LOG_WARN("no primary selection available");