E (RandR): Fix corner case where rotation was done by user for a full

360 degrees and snapping was incorrect.



SVN revision: 77204
This commit is contained in:
Christopher Michael 2012-09-28 12:43:43 +00:00
parent 336b70d246
commit 4e9dd83e44
1 changed files with 5 additions and 1 deletions

View File

@ -918,9 +918,13 @@ _e_smart_monitor_orientation_get(E_Smart_Data *sd)
degree = sd->rotation;
if (degree < 0) degree += 360;
else if (degree > 360) degree -= 360;
/* find the closest degree of rotation within 'fuzziness' tolerance */
if (((degree - ROTATE_SNAP_FUZZINESS) <= 90) ||
if (((degree - ROTATE_SNAP_FUZZINESS) <= 0) ||
((degree + ROTATE_SNAP_FUZZINESS) <= 0))
return 0;
else if (((degree - ROTATE_SNAP_FUZZINESS) <= 90) ||
((degree + ROTATE_SNAP_FUZZINESS) <= 90))
return 90;
else if (((degree - ROTATE_SNAP_FUZZINESS) <= 180) ||