rotation: ignored client's window rotation which passes same value 74/121674/1
authorGwanglim Lee <gl77.lee@samsung.com>
Tue, 28 Mar 2017 11:07:37 +0000 (20:07 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Tue, 28 Mar 2017 11:07:37 +0000 (20:07 +0900)
as the current angle using availables set.

Change-Id: I38a3e2887b8858267e90b4d8c5f8ef8842f56bd4

src/rotation/e_mod_rotation_wl.c

index c67e02a..039bb37 100644 (file)
@@ -416,6 +416,15 @@ _e_tizen_rotation_set_available_angles_cb(struct wl_client *client,
 
         if (tz_angle)
           {
+             /* if the client requests a window rotation with the same value as the current angle, just ignore it. */
+             if ((ec->first_mapped) &&
+                 (ec->e.state.rot.ang.curr == TIZEN_ROTATION_ANGLE_TO_INT(tz_angle)))
+               {
+                  EDBG(ec, "Ignore it. given angle %d is same as the current angle for landscape only app.",
+                       tz_angle);
+                  return;
+               }
+
              serial = wl_display_next_serial(e_comp_wl->wl.disp);
 
              EDBG(ec, "Send Change Rotation: angle %d for redering preparation of landscape only app. mapped:%d serial:%u",