ecore-evas-drm: Set window to receive input events
authorChris Michael <cp.michael@samsung.com>
Mon, 10 Mar 2014 12:38:51 +0000 (12:38 +0000)
committerChris Michael <cp.michael@samsung.com>
Mon, 10 Mar 2014 12:40:31 +0000 (12:40 +0000)
After we have setup ecore-drm, we need to tell it where to send any
input events, so call the ecore-drm API function to set the window.
Also feed mouse_in to the canvas after creation, so that it gets focus.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
src/modules/ecore_evas/engines/drm/ecore_evas_drm.c

index 78dc495..e3684a7 100644 (file)
@@ -213,6 +213,11 @@ ecore_evas_drm_new_internal(const char *device, unsigned int parent, int x, int
 
    _ecore_evas_register(ee);
    ecore_evas_input_event_register(ee);
+   ecore_drm_device_window_set(dev, ee);
+   evas_event_feed_mouse_in(ee->evas, 
+                            (unsigned int)((unsigned long long)
+                                           (ecore_time_get() * 1000.0) & 
+                                           0xffffffff), NULL);
 
    return ee;
 
@@ -266,12 +271,14 @@ _ecore_evas_drm_init(void)
         goto sprite_err;
      }
 
+   /* NB: We don't need to create outputs here. Evas will create the 
+    * framebuffers it needs */
    /* try to create outputs */
-   if (!ecore_drm_outputs_create(dev))
-     {
-        ERR("Could not create outputs: %m");
-        goto output_err;
-     }
+   /* if (!ecore_drm_outputs_create(dev)) */
+   /*   { */
+   /*      ERR("Could not create outputs: %m"); */
+   /*      goto output_err; */
+   /*   } */
 
    /* try to create inputs */
    if (!ecore_drm_inputs_create(dev))