From b04fa2ddba67528c1faacbac6d864b6b21f3dd64 Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Tue, 7 Feb 2017 16:53:09 -0600 Subject: [PATCH] elput: Fix async input shutdown during init By only checking if the thread was cancelled *after* sending feedback to the main thread we ended up claiming all the devices libinput asked for in a way that never allowed them to be released (how the hell can a cancelled thread send feedback?) --- src/lib/elput/elput_input.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/elput/elput_input.c b/src/lib/elput/elput_input.c index cc29cfc4a6..8e10495028 100644 --- a/src/lib/elput/elput_input.c +++ b/src/lib/elput/elput_input.c @@ -12,6 +12,7 @@ _cb_open_restricted(const char *path, int flags, void *data) if (!em->input.thread) return em->interface->open(em, path, flags); if (!em->interface->open_async) return ret; + if (ecore_thread_check(em->input.thread)) return ret; ao = calloc(1, sizeof(Elput_Async_Open)); if (!ao) return ret; if (pipe2(p, O_CLOEXEC) < 0)