ecore_evas_wayland: send rotate done message when disapay server's callback is called. 11/123011/2
authorJiyoun Park <jy0703.park@samsung.com>
Sat, 18 Feb 2017 09:19:42 +0000 (18:19 +0900)
committerJiyoun Park <jy0703.park@samsung.com>
Tue, 4 Apr 2017 07:51:47 +0000 (16:51 +0900)
Currently, if app turns on the feature "app will control the roation" like camera,
there is problem which negotiate the rotation protocol with display server.

if app turns on "app will control the roation" feature
1. when app rotate the canvas using the elm_win_rotation_with_resize_set api,
efl client will not send rotation done message to display server.
2. when display server call the _ecore_wl_window_cb_angle_change,
efl client sends fake rotation done message.

Change-Id: If82de0b96f7dafc605be5d28aa2e33a377324dad

src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c

index a8702d8..58110f7 100755 (executable)
@@ -351,41 +351,11 @@ _ecore_evas_wl_common_cb_window_pending_rotate(Ecore_Evas *ee, Ecore_Wl_Event_Wi
 //   if (ee->prop.wm_rot.pending_mode.app_angle != (int) ev->angle)
      {
         DBG("PendingRotation: ecore_evas_wl pend rotation");
+        //THIS IS HOTFIX: we need to negotiate rotation done protocol with display server.
+        ecore_wl_window_rotation_change_done_send(wdata->win);
         ee->prop.wm_rot.pending_mode.wm_angle = ev->angle;
         return ECORE_CALLBACK_PASS_ON;
      }
-
-   DBG("PendingRotation: ecore_evas_wl do rotation %d", ev->angle);
-   wdata->wm_rot.request = 1;
-   wdata->wm_rot.done = 0;
-
-   if ((ee->w != ev->w) || (ee->h != ev->h))
-     {
-        _ecore_evas_wl_common_resize(ee, ev->w , ev->h);
-     }
-
-   if (ee->prop.wm_rot.manual_mode.set)
-     {
-        ee->prop.wm_rot.manual_mode.wait_for_done = EINA_TRUE;
-        _ecore_evas_wl_common_wm_rot_manual_rotation_done_timeout_update(ee);
-     }
-
-   if (!strcmp(ee->driver, "wayland_shm"))
-     {
-#ifdef BUILD_ECORE_EVAS_WAYLAND_SHM
-        _ecore_evas_wayland_shm_window_rotate(ee, ev->angle, 1);
-#endif
-     }
-   else if (!strcmp(ee->driver, "wayland_egl"))
-     {
-#ifdef BUILD_ECORE_EVAS_WAYLAND_EGL
-        _ecore_evas_wayland_egl_window_rotate(ee, ev->angle, 1);
-#endif
-     }
-
-   wdata->wm_rot.done = 1;
-
-   return ECORE_CALLBACK_PASS_ON;
 }
 //
 
@@ -649,8 +619,8 @@ _ecore_evas_wl_common_app_rotation_set(Ecore_Evas *ee, int rotation, int resize)
      return;
 
    DBG("RotationPending: ecore_evas_wl do rotation %d", rotation);
-   wdata->wm_rot.request = 1;
-   wdata->wm_rot.done = 0;
+   //wdata->wm_rot.request = 1;
+   //wdata->wm_rot.done = 0;
 
    if (!strcmp(ee->driver, "wayland_shm"))
      {
@@ -665,7 +635,7 @@ _ecore_evas_wl_common_app_rotation_set(Ecore_Evas *ee, int rotation, int resize)
 #endif
      }
 
-   wdata->wm_rot.done = 1;
+   //wdata->wm_rot.done = 1;
 }
 //