evas_events : last_mouse needs to be used even pdata is founded 36/190836/2 accepted/tizen/unified/20181007.224906 submit/tizen/20181006.080128
authorWooHyun Jung <wh0705.jung@samsung.com>
Sat, 6 Oct 2018 07:42:45 +0000 (16:42 +0900)
committerWooHyun Jung <wh0705.jung@samsung.com>
Sat, 6 Oct 2018 07:50:50 +0000 (07:50 +0000)
In some cases, unexpected pdata is founded and all the logics in
evas_events are conflicted becuase of failure in pdata matching.

For example, mouse_down and mouse_up use the same ev->device, but
mouse_move uses the different one.

This only can be happened in Tizen, so just keep it as Tizen Only
Fix.

@hosang will improve this patch to keep the last_mouse not per evas
but per seat.

@tizen_fix

Change-Id: Ic80a36b4c8c1a3431f97099f397d5da6f84e7324

src/lib/evas/canvas/evas_events.c

index 10c2cbd..d871ffc 100644 (file)
@@ -4427,14 +4427,12 @@ _evas_canvas_event_pointer_in_list_mouse_move_feed(Evas_Public_Data *edata,
             (!xor_rule && (in || found)))
           {
              //TIZEN_ONLY(20180530): add storing last mouse device.
+             //TIZEN_ONLY(20181006): Now, last_mouse is always used even pdata is founded.
              //if (!pdata) pdata = EINA_INLIST_CONTAINER_GET(pseat->pointers, Evas_Pointer_Data);
-             if (!pdata)
-               {
-                  if (edata->last_mouse)
-                    pdata = _evas_pointer_data_by_device_get(edata, edata->last_mouse);
-                  else
-                    pdata = EINA_INLIST_CONTAINER_GET(pseat->pointers, Evas_Pointer_Data);
-               }
+             if (edata->last_mouse)
+               pdata = _evas_pointer_data_by_device_get(edata, edata->last_mouse);
+             else if (!pdata)
+               pdata = EINA_INLIST_CONTAINER_GET(pseat->pointers, Evas_Pointer_Data);
              //
              _evas_canvas_event_pointer_move_event_dispatch(edata, pdata, data);
           }