mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-11 04:27:49 -05:00
wayland: register FDM hook early, to avoid unregister errors when failing
This commit is contained in:
parent
217f16e434
commit
404365ec56
1 changed files with 5 additions and 5 deletions
10
wayland.c
10
wayland.c
|
|
@ -727,6 +727,11 @@ wayl_init(const struct config *conf, struct fdm *fdm)
|
|||
wayl->fdm = fdm;
|
||||
wayl->kbd.repeat.fd = -1;
|
||||
|
||||
if (!fdm_hook_add(fdm, &fdm_hook, wayl, FDM_HOOK_PRIORITY_LOW)) {
|
||||
LOG_ERR("failed to add FDM hook");
|
||||
goto out;
|
||||
}
|
||||
|
||||
wayl->display = wl_display_connect(NULL);
|
||||
if (wayl->display == NULL) {
|
||||
LOG_ERR("failed to connect to wayland; no compositor running?");
|
||||
|
|
@ -851,11 +856,6 @@ wayl_init(const struct config *conf, struct fdm *fdm)
|
|||
goto out;
|
||||
}
|
||||
|
||||
if (!fdm_hook_add(fdm, &fdm_hook, wayl, FDM_HOOK_PRIORITY_LOW)) {
|
||||
LOG_ERR("failed to add FDM hook");
|
||||
goto out;
|
||||
}
|
||||
|
||||
return wayl;
|
||||
|
||||
out:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue