diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-03-09 17:45:43 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-03-09 17:45:43 +0000 |
| commit | 404365ec56dd3e238be46946dd15a229a64bf154 (patch) | |
| tree | f00f4d085f99fabd7fa78ac6949c41657f49c0b5 | |
| parent | .desktop: 'terminal' is not a common icon name (diff) | |
wayland: register FDM hook early, to avoid unregister errors when failing
| -rw-r--r-- | wayland.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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: |
