From 9d14a50e1fe167e0c7e24cbb933e758d999b809f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Lind?= <jorgen.lind@nokia.com> Date: Mon, 30 Jan 2012 09:53:25 +0100 Subject: [PATCH] Surface::isInverted Dont use xor and move the ret variable outside the ifdef Change-Id: I6f9048cd7d5992ef46dcc0e9d05e86f2f7ca4033 Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com> --- src/compositor/wayland_wrapper/wlsurface.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/compositor/wayland_wrapper/wlsurface.cpp b/src/compositor/wayland_wrapper/wlsurface.cpp index 223a350c..92acac0c 100644 --- a/src/compositor/wayland_wrapper/wlsurface.cpp +++ b/src/compositor/wayland_wrapper/wlsurface.cpp @@ -428,11 +428,10 @@ WaylandSurface::Type Surface::type() const bool Surface::isYInverted() const { + bool ret = false; #ifdef QT_COMPOSITOR_WAYLAND_GL Q_D(const Surface); - bool ret = false; - static bool negateReturn = qgetenv("QT_COMPOSITOR_NEGATE_INVERTED_Y").toInt(); if (!d->surfaceBuffer) { @@ -443,7 +442,7 @@ bool Surface::isYInverted() const #endif ret = true; - return ret^negateReturn; + return ret != negateReturn; } bool Surface::visible() const -- GitLab