From 1e6e5047be8295c922bb16b711eb5ad6b565724a Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 2 Jun 2017 18:23:44 -0400 Subject: [PATCH] ee engines: update engines for per-seat cursor objects ref 5856d3b52f6124ad5b4cfe47b21f28ab6f380002 --- src/modules/ecore_evas/engines/fb/ecore_evas_fb.c | 6 ++++-- src/modules/ecore_evas/engines/psl1ght/ecore_evas_psl1ght.c | 3 ++- src/modules/ecore_evas/engines/win32/ecore_evas_win32.c | 6 ++++-- src/modules/ecore_evas/engines/x/ecore_evas_x.c | 6 ++++-- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/modules/ecore_evas/engines/fb/ecore_evas_fb.c b/src/modules/ecore_evas/engines/fb/ecore_evas_fb.c index 2f5d20a30f..a5ffd469e8 100644 --- a/src/modules/ecore_evas/engines/fb/ecore_evas_fb.c +++ b/src/modules/ecore_evas/engines/fb/ecore_evas_fb.c @@ -56,13 +56,14 @@ struct _Ecore_Evas_Engine_FB_Data { static void _ecore_evas_mouse_move_process_fb(Ecore_Evas *ee, int x, int y) { - Efl_Input_Device *pointer; + const Efl_Input_Device *pointer; Ecore_Evas_Cursor *cursor; int fbw, fbh; ecore_fb_size_get(&fbw, &fbh); pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_CLASS_MOUSE); + pointer = evas_device_parent_get(pointer); cursor = eina_hash_find(ee->prop.cursors, &pointer); EINA_SAFETY_ON_NULL_RETURN(cursor); cursor->pos_x = x; @@ -325,12 +326,13 @@ _ecore_evas_move_resize(Ecore_Evas *ee, int x EINA_UNUSED, int y EINA_UNUSED, in static void _ecore_evas_rotation_set(Ecore_Evas *ee, int rotation, int resize EINA_UNUSED) { - Evas_Device *pointer; + const Evas_Device *pointer; Ecore_Evas_Cursor *cursor; Evas_Engine_Info_FB *einfo; int rot_dif; pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_CLASS_MOUSE); + pointer = evas_device_parent_get(pointer); cursor = eina_hash_find(ee->prop.cursors, &pointer); EINA_SAFETY_ON_NULL_RETURN(cursor); diff --git a/src/modules/ecore_evas/engines/psl1ght/ecore_evas_psl1ght.c b/src/modules/ecore_evas/engines/psl1ght/ecore_evas_psl1ght.c index c0491b8225..03954e4ee0 100644 --- a/src/modules/ecore_evas/engines/psl1ght/ecore_evas_psl1ght.c +++ b/src/modules/ecore_evas/engines/psl1ght/ecore_evas_psl1ght.c @@ -212,7 +212,7 @@ _ecore_evas_psl1ght_callback_delete_request_set(Ecore_Evas *ee, Ecore_Evas_Event static void _ecore_evas_screen_resized(Ecore_Evas *ee) { - Evas_Device *pointer; + const Evas_Device *pointer; Ecore_Evas_Cursor *cursor; int w, h; @@ -222,6 +222,7 @@ _ecore_evas_screen_resized(Ecore_Evas *ee) ecore_psl1ght_screen_resolution_get (&w, &h); pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_CLASS_MOUSE); + pointer = evas_device_parent_get(pointer); cursor = eina_hash_find(ee->prop.cursors, &pointer); EINA_SAFETY_ON_NULL_RETURN(cursor); diff --git a/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c b/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c index af0fc3c93c..0cc28a8ac8 100644 --- a/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c +++ b/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c @@ -329,7 +329,7 @@ _ecore_evas_win32_event_window_hide(void *data EINA_UNUSED, int type EINA_UNUSED static Eina_Bool _ecore_evas_win32_event_window_configure(void *data EINA_UNUSED, int type EINA_UNUSED, void *event) { - Evas_Device *pointer; + const Evas_Device *pointer; Ecore_Evas_Cursor *cursor; Ecore_Evas *ee; Ecore_Win32_Event_Window_Configure *e; @@ -343,6 +343,7 @@ _ecore_evas_win32_event_window_configure(void *data EINA_UNUSED, int type EINA_U if ((Ecore_Window)e->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON; pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_CLASS_MOUSE); + pointer = evas_device_parent_get(pointer); cursor = eina_hash_find(ee->prop.cursors, &pointer); EINA_SAFETY_ON_NULL_RETURN_VAL(cursor, 1); @@ -651,7 +652,7 @@ _ecore_evas_win32_move_resize(Ecore_Evas *ee, int x, int y, int width, int heigh static void _ecore_evas_win32_rotation_set_internal(Ecore_Evas *ee, int rotation) { - Evas_Device *pointer; + const Evas_Device *pointer; Ecore_Evas_Cursor *cursor; int rot_dif; @@ -659,6 +660,7 @@ _ecore_evas_win32_rotation_set_internal(Ecore_Evas *ee, int rotation) if (rot_dif < 0) rot_dif = -rot_dif; pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_CLASS_MOUSE); + pointer = evas_device_parent_get(pointer); cursor = eina_hash_find(ee->prop.cursors, &pointer); EINA_SAFETY_ON_NULL_RETURN(cursor); diff --git a/src/modules/ecore_evas/engines/x/ecore_evas_x.c b/src/modules/ecore_evas/engines/x/ecore_evas_x.c index ffc9a7a6ac..8c42bc2db5 100644 --- a/src/modules/ecore_evas/engines/x/ecore_evas_x.c +++ b/src/modules/ecore_evas/engines/x/ecore_evas_x.c @@ -1608,7 +1608,7 @@ static Eina_Bool _ecore_evas_x_event_window_configure(void *data EINA_UNUSED, int type EINA_UNUSED, void *event) { - Evas_Device *pointer; + const Evas_Device *pointer; Ecore_Evas_Cursor *cursor; Ecore_Evas *ee; Ecore_X_Event_Window_Configure *e; @@ -1623,6 +1623,7 @@ _ecore_evas_x_event_window_configure(void *data EINA_UNUSED, int type EINA_UNUSE if (edata->direct_resize) return ECORE_CALLBACK_PASS_ON; pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_CLASS_MOUSE); + pointer = evas_device_parent_get(pointer); cursor = eina_hash_find(ee->prop.cursors, &pointer); EINA_SAFETY_ON_NULL_RETURN_VAL(cursor, ECORE_CALLBACK_PASS_ON); @@ -2338,13 +2339,14 @@ static void _ecore_evas_x_rotation_set_internal(Ecore_Evas *ee, int rotation, int resize, Evas_Engine_Info *einfo) { - Evas_Device *pointer; + const Evas_Device *pointer; Ecore_Evas_Cursor *cursor; int rot_dif; Ecore_Evas_Engine_Data_X11 *edata = ee->engine.data; int fw = 0, fh = 0; pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_CLASS_MOUSE); + pointer = evas_device_parent_get(pointer); cursor = eina_hash_find(ee->prop.cursors, &pointer); EINA_SAFETY_ON_NULL_RETURN(cursor);