From eacbb4bc33617edc3d9fa39e6870749deb582c45 Mon Sep 17 00:00:00 2001 From: ChunEon Park Date: Wed, 21 Nov 2012 11:42:52 +0000 Subject: [PATCH] elementary/win - more reasonable exception handling Thanks GArik__ for reporting SVN revision: 79508 --- legacy/elementary/src/lib/elm_win.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/legacy/elementary/src/lib/elm_win.c b/legacy/elementary/src/lib/elm_win.c index 70934e36e3..9d344844eb 100644 --- a/legacy/elementary/src/lib/elm_win.c +++ b/legacy/elementary/src/lib/elm_win.c @@ -3463,7 +3463,12 @@ elm_win_rotation_set(Evas_Object *obj, ELM_WIN_CHECK(obj); ELM_WIN_DATA_GET_OR_RETURN(obj, sd); - if (rotation < 0) rotation = -rotation; + if ((rotation > 360) || (rotation < 0)) + { + WRN("Rotation degree should be 0 ~ 360"); + if (rotation > 360) rotation %= 360; + if (rotation < 0) rotation += 360; + } if (sd->rot == rotation) return; sd->rot = rotation; TRAP(sd, rotation_set, rotation);