diff --git a/src/backends/meta-monitor-transform.h b/src/backends/meta-monitor-transform.h index 6fca0a4e3fbb2aabe899b4dcc4777116ee0c3d63..e5757e8694541ce7ec0b3e4a22e51452a158ac62 100644 --- a/src/backends/meta-monitor-transform.h +++ b/src/backends/meta-monitor-transform.h @@ -49,7 +49,7 @@ meta_monitor_transform_is_rotated (MetaMonitorTransform transform) static inline gboolean meta_monitor_transform_is_flipped (MetaMonitorTransform transform) { - return (abs(transform) >= META_MONITOR_TRANSFORM_FLIPPED); + return (transform >= META_MONITOR_TRANSFORM_FLIPPED); } MetaMonitorTransform meta_monitor_transform_invert (MetaMonitorTransform transform); diff --git a/src/tests/monitor-transform-tests.c b/src/tests/monitor-transform-tests.c index 91ce985beb3e1f4261d73631d2548b4582bb5b43..fb505d00c8a77f6c5cb31469df7eabe369c96d5d 100644 --- a/src/tests/monitor-transform-tests.c +++ b/src/tests/monitor-transform-tests.c @@ -62,22 +62,22 @@ test_transform (void) }, { .transform = META_MONITOR_TRANSFORM_NORMAL, - .other = -META_MONITOR_TRANSFORM_90, + .other = META_MONITOR_TRANSFORM_270, .expect = META_MONITOR_TRANSFORM_270, }, { .transform = META_MONITOR_TRANSFORM_FLIPPED, - .other = -META_MONITOR_TRANSFORM_90, + .other = META_MONITOR_TRANSFORM_270, .expect = META_MONITOR_TRANSFORM_FLIPPED_270, }, { .transform = META_MONITOR_TRANSFORM_FLIPPED_180, - .other = -META_MONITOR_TRANSFORM_270, + .other = META_MONITOR_TRANSFORM_90, .expect = META_MONITOR_TRANSFORM_FLIPPED_270, }, { .transform = META_MONITOR_TRANSFORM_FLIPPED_180, - .other = -META_MONITOR_TRANSFORM_FLIPPED_180, + .other = META_MONITOR_TRANSFORM_FLIPPED_180, .expect = META_MONITOR_TRANSFORM_NORMAL, }, };