summaryrefslogtreecommitdiff
path: root/src/modules/ecore_evas/engines/drm
diff options
context:
space:
mode:
authorChris Michael <cpmichael@osg.samsung.com>2016-05-26 10:46:40 -0400
committerChris Michael <cpmichael@osg.samsung.com>2016-05-27 11:57:53 -0400
commit593961c2e21b1bb1023e04231619d21af30ab767 (patch)
treeb1fc4e906f232dbeb71cdd4e3cceb258c036ab8e /src/modules/ecore_evas/engines/drm
parent0416aa6bf34f19d618d84344f6cfd22f4774609f (diff)
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>
Diffstat (limited to 'src/modules/ecore_evas/engines/drm')
-rw-r--r--src/modules/ecore_evas/engines/drm/ecore_evas_drm.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
index f6f4e0c0a9..e14254b381 100644
--- a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
+++ b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
@@ -58,8 +58,6 @@ static int _drm_init_count = 0;
58static int 58static int
59_ecore_evas_drm_init(Ecore_Evas_Engine_Drm_Data *edata, const char *device) 59_ecore_evas_drm_init(Ecore_Evas_Engine_Drm_Data *edata, const char *device)
60{ 60{
61 int mw, mh;
62
63 if (++_drm_init_count != 1) return _drm_init_count; 61 if (++_drm_init_count != 1) return _drm_init_count;
64 62
65 if (!ecore_drm2_init()) 63 if (!ecore_drm2_init())
@@ -97,9 +95,6 @@ _ecore_evas_drm_init(Ecore_Evas_Engine_Drm_Data *edata, const char *device)
97 if (!edata->output) 95 if (!edata->output)
98 WRN("Could not find output at %d %d", edata->x, edata->y); 96 WRN("Could not find output at %d %d", edata->x, edata->y);
99 97
100 ecore_drm2_output_crtc_size_get(edata->output, &mw, &mh);
101 ecore_drm2_device_pointer_max_set(edata->dev, mw, mh);
102
103 ecore_event_evas_init(); 98 ecore_event_evas_init();
104 99
105 return _drm_init_count; 100 return _drm_init_count;
@@ -678,7 +673,7 @@ ecore_evas_drm_new_internal(const char *device, unsigned int parent EINA_UNUSED,
678 Evas_Engine_Info_Drm *einfo; 673 Evas_Engine_Info_Drm *einfo;
679 Ecore_Evas_Interface_Drm *iface; 674 Ecore_Evas_Interface_Drm *iface;
680 Ecore_Evas_Engine_Drm_Data *edata; 675 Ecore_Evas_Engine_Drm_Data *edata;
681 int method; 676 int method, mw, mh;
682 677
683 method = evas_render_method_lookup("drm"); 678 method = evas_render_method_lookup("drm");
684 if (!method) return NULL; 679 if (!method) return NULL;
@@ -776,6 +771,12 @@ ecore_evas_drm_new_internal(const char *device, unsigned int parent EINA_UNUSED,
776 (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process, 771 (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
777 (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process); 772 (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
778 773
774 ecore_drm2_output_crtc_size_get(edata->output, &mw, &mh);
775
776 ecore_drm2_device_calibrate(edata->dev, mw, mh);
777 ecore_drm2_device_pointer_max_set(edata->dev, mw, mh);
778 ecore_drm2_device_pointer_warp(edata->dev, mw / 2, mh / 2);
779
779 return ee; 780 return ee;
780 781
781eng_err: 782eng_err:
@@ -791,7 +792,7 @@ ecore_evas_gl_drm_new_internal(const char *device, unsigned int parent EINA_UNUS
791 Evas_Engine_Info_GL_Drm *einfo; 792 Evas_Engine_Info_GL_Drm *einfo;
792 Ecore_Evas_Interface_Drm *iface; 793 Ecore_Evas_Interface_Drm *iface;
793 Ecore_Evas_Engine_Drm_Data *edata; 794 Ecore_Evas_Engine_Drm_Data *edata;
794 int method; 795 int method, mw, mh;
795 796
796 method = evas_render_method_lookup("gl_drm"); 797 method = evas_render_method_lookup("gl_drm");
797 if (!method) return NULL; 798 if (!method) return NULL;
@@ -905,6 +906,12 @@ ecore_evas_gl_drm_new_internal(const char *device, unsigned int parent EINA_UNUS
905 (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process, 906 (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
906 (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process); 907 (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
907 908
909 ecore_drm2_output_crtc_size_get(edata->output, &mw, &mh);
910
911 ecore_drm2_device_calibrate(edata->dev, mw, mh);
912 ecore_drm2_device_pointer_max_set(edata->dev, mw, mh);
913 ecore_drm2_device_pointer_warp(edata->dev, mw / 2, mh / 2);
914
908 return ee; 915 return ee;
909 916
910eng_err: 917eng_err: