forked from enlightenment/enlightenment
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:
parent
336b70d246
commit
4e9dd83e44
|
@ -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) ||
|
||||
|
|
Loading…
Reference in New Issue