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 <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2015-02-11 14:51:44 -05:00
parent 4f320a80df
commit ab2487037f
1 changed files with 9 additions and 0 deletions

View File

@ -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);