rotation: fixed bug for unsetting unknown angle value 45/128645/1
authorDoyoun Kang <doyoun.kang@samsung.com>
Thu, 11 May 2017 00:50:02 +0000 (09:50 +0900)
committerDoyoun Kang <doyoun.kang@samsung.com>
Thu, 11 May 2017 00:50:05 +0000 (09:50 +0900)
(When the auto-rotation is turned off,) there was a bug that the window is not changed to portrait mode
after hiding the landscape window which set preferred angle to 90 or 270.

Change-Id: I4febe81082c6ba213b6c7fbd25b6b1078142255f

src/rotation/e_mod_rotation_wl.c

index 924e044..e7cb91a 100644 (file)
@@ -1816,7 +1816,7 @@ e_zone_rotation_set(E_Zone *zone, int rotation)
 
    if (rotation == -1)
      {
-        ELOGF("ROTATION", "ZONE_ROT |UNKOWN SET|zone:%d|rot curr:%d, rot:%d",
+        ELOGF("ROTATION", "ZONE_ROT |UNKNOWN SET|zone:%d|rot curr:%d, rot:%d",
               NULL, NULL, zone->num, zone->rot.curr, rotation);
         return;
      }
@@ -1842,7 +1842,15 @@ e_zone_rotation_set(E_Zone *zone, int rotation)
              return;
           }
 
-        ELOGF("ROTATION", "ZONE_ROT |UNKOWN SET|zone:%d|rot curr:%d, rot:%d",
+        if (zone->rot.block.sys_auto_rot)
+          {
+             ELOGF("ROTATION", "ZONE_ROT |SKIP|zone:%d curr:%d rotation:%d. auto rotation is locked",
+                    NULL, NULL, zone->num, zone->rot.curr, rotation);
+             zone->rot.unknown_state = EINA_FALSE;
+             return;
+          }
+
+        ELOGF("ROTATION", "ZONE_ROT |UNKNOWN SET|zone:%d|rot curr:%d, rot:%d",
               NULL, NULL, zone->num, zone->rot.curr, rotation);
         return;
      }