e_comp: fix sending worng touch position when ec is transform for hwc 03/187903/1
authorChangyeon Lee <cyeon.lee@samsung.com>
Tue, 7 Aug 2018 12:48:56 +0000 (21:48 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Wed, 29 Aug 2018 09:03:47 +0000 (18:03 +0900)
- generally touch position is calculated with img object size(last child object of smart object).
- if ec is transform for hwc and screen rotation, img object is resized by transformed buffer
  and then evas calculate touch position with transformed size and e20 get worng touch position.
- for calculating touch position with surface size, e20 add map_input_obj and resize with surface
  size when ec is transformed
- but evas can't change evas_object which calculated (img obj->map_input_obj) when touch is pressed
- so ec isn't available hwc if client is needed transform and touch is pressed

Change-Id: I57353cf0a2fb611799b16af1159e625b7e04c944

src/bin/e_comp.c

index b57480b7b139ef23d9fd7e8c191ad787f518cd5b..f33b1ba46b3c19a3fa23fb3fb9e4839654d0ad6c 100644 (file)
@@ -317,6 +317,7 @@ _hwc_available_get(E_Client *ec)
    E_Comp_Wl_Client_Data *cdata = (E_Comp_Wl_Client_Data*)ec->comp_data;
    E_Output *eout;
    int minw = 0, minh = 0;
+   int transform;
 
    if ((!cdata) ||
        (!cdata->buffer_ref.buffer) ||
@@ -361,11 +362,15 @@ _hwc_available_get(E_Client *ec)
     * we can control client's buffer transform. In this case, we don't need to
     * check client's buffer transform here.
     */
-   if (!e_comp_screen_rotation_ignore_output_transform_watch(ec))
+   transform = e_comp_wl_output_buffer_transform_get(ec);
+   if ((eout->config.rotation / 90) != transform)
      {
-        int transform = e_comp_wl_output_buffer_transform_get(ec);
-
-        if ((eout->config.rotation / 90) != transform)
+        if (e_comp_screen_rotation_ignore_output_transform_watch(ec))
+          {
+            if (e_comp_wl->touch.pressed)
+              return EINA_FALSE;
+          }
+        else
           return EINA_FALSE;
      }