ecore-drm: Disable/Enable inputs if we release/aquire VT through logind
authorChris Michael <cp.michael@samsung.com>
Wed, 11 Feb 2015 19:51:44 +0000 (14:51 -0500)
committerChris Michael <cp.michael@samsung.com>
Wed, 11 Feb 2015 19:51:44 +0000 (14:51 -0500)
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>
src/lib/ecore_drm/ecore_drm_logind.c

index f820756..d49d2c7 100644 (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);