From ab2487037fc4b11eabc874bd95085a232e4d12c8 Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Wed, 11 Feb 2015 14:51:44 -0500 Subject: [PATCH] ecore-drm: Disable/Enable inputs if we release/aquire VT through logind Summary: Due to libinput processing events directly from evdev, we need to disable/enable input events when we release/acquire the vt. @fix Signed-off-by: Chris Michael --- src/lib/ecore_drm/ecore_drm_logind.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/lib/ecore_drm/ecore_drm_logind.c b/src/lib/ecore_drm/ecore_drm_logind.c index f820756..d49d2c7 100644 --- a/src/lib/ecore_drm/ecore_drm_logind.c +++ b/src/lib/ecore_drm/ecore_drm_logind.c @@ -148,6 +148,7 @@ _ecore_drm_logind_cb_activate(void *data, int type EINA_UNUSED, void *event) Ecore_Drm_Event_Activate *ev; Ecore_Drm_Device *dev; Ecore_Drm_Output *output; + Ecore_Drm_Input *input; Eina_List *l; if ((!event) || (!data)) return ECORE_CALLBACK_RENEW; @@ -160,11 +161,19 @@ _ecore_drm_logind_cb_activate(void *data, int type EINA_UNUSED, void *event) /* set output mode */ EINA_LIST_FOREACH(dev->outputs, l, output) ecore_drm_output_enable(output); + + /* enable inputs */ + EINA_LIST_FOREACH(dev->inputs, l, input) + ecore_drm_inputs_enable(input); } else { Ecore_Drm_Sprite *sprite; + /* disable inputs */ + EINA_LIST_FOREACH(dev->inputs, l, input) + ecore_drm_inputs_disable(input); + /* disable hardware cursor */ EINA_LIST_FOREACH(dev->outputs, l, output) ecore_drm_output_cursor_size_set(output, 0, 0, 0); -- 2.7.4