ee engines: update engines for per-seat cursor objects

ref 5856d3b52f6124ad5b4cfe47b21f28ab6f380002
This commit is contained in:
Mike Blumenkrantz 2017-06-02 18:23:44 -04:00
parent cde843438d
commit 1e6e5047be
4 changed files with 14 additions and 7 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);