ecore-evas-drm: Fix issue of mouse pointer not centering on startup
This patch fixes an issue where starting Enlightenment would not center the mouse pointer. Basically the issue is that we cannot warp the mouse pointer until After the ee->prop.window has been set else E will not process the mouse_move event @fix Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
This commit is contained in:
parent
0416aa6bf3
commit
593961c2e2
|
@ -58,8 +58,6 @@ static int _drm_init_count = 0;
|
|||
static int
|
||||
_ecore_evas_drm_init(Ecore_Evas_Engine_Drm_Data *edata, const char *device)
|
||||
{
|
||||
int mw, mh;
|
||||
|
||||
if (++_drm_init_count != 1) return _drm_init_count;
|
||||
|
||||
if (!ecore_drm2_init())
|
||||
|
@ -97,9 +95,6 @@ _ecore_evas_drm_init(Ecore_Evas_Engine_Drm_Data *edata, const char *device)
|
|||
if (!edata->output)
|
||||
WRN("Could not find output at %d %d", edata->x, edata->y);
|
||||
|
||||
ecore_drm2_output_crtc_size_get(edata->output, &mw, &mh);
|
||||
ecore_drm2_device_pointer_max_set(edata->dev, mw, mh);
|
||||
|
||||
ecore_event_evas_init();
|
||||
|
||||
return _drm_init_count;
|
||||
|
@ -678,7 +673,7 @@ ecore_evas_drm_new_internal(const char *device, unsigned int parent EINA_UNUSED,
|
|||
Evas_Engine_Info_Drm *einfo;
|
||||
Ecore_Evas_Interface_Drm *iface;
|
||||
Ecore_Evas_Engine_Drm_Data *edata;
|
||||
int method;
|
||||
int method, mw, mh;
|
||||
|
||||
method = evas_render_method_lookup("drm");
|
||||
if (!method) return NULL;
|
||||
|
@ -776,6 +771,12 @@ ecore_evas_drm_new_internal(const char *device, unsigned int parent EINA_UNUSED,
|
|||
(Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
|
||||
(Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
|
||||
|
||||
ecore_drm2_output_crtc_size_get(edata->output, &mw, &mh);
|
||||
|
||||
ecore_drm2_device_calibrate(edata->dev, mw, mh);
|
||||
ecore_drm2_device_pointer_max_set(edata->dev, mw, mh);
|
||||
ecore_drm2_device_pointer_warp(edata->dev, mw / 2, mh / 2);
|
||||
|
||||
return ee;
|
||||
|
||||
eng_err:
|
||||
|
@ -791,7 +792,7 @@ ecore_evas_gl_drm_new_internal(const char *device, unsigned int parent EINA_UNUS
|
|||
Evas_Engine_Info_GL_Drm *einfo;
|
||||
Ecore_Evas_Interface_Drm *iface;
|
||||
Ecore_Evas_Engine_Drm_Data *edata;
|
||||
int method;
|
||||
int method, mw, mh;
|
||||
|
||||
method = evas_render_method_lookup("gl_drm");
|
||||
if (!method) return NULL;
|
||||
|
@ -905,6 +906,12 @@ ecore_evas_gl_drm_new_internal(const char *device, unsigned int parent EINA_UNUS
|
|||
(Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
|
||||
(Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
|
||||
|
||||
ecore_drm2_output_crtc_size_get(edata->output, &mw, &mh);
|
||||
|
||||
ecore_drm2_device_calibrate(edata->dev, mw, mh);
|
||||
ecore_drm2_device_pointer_max_set(edata->dev, mw, mh);
|
||||
ecore_drm2_device_pointer_warp(edata->dev, mw / 2, mh / 2);
|
||||
|
||||
return ee;
|
||||
|
||||
eng_err:
|
||||
|
|
Loading…
Reference in New Issue