summaryrefslogtreecommitdiffstats
path: root/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/qmeegographicssystemhelper/qmeegographicssystemhelper.cpp')
-rw-r--r--tools/qmeegographicssystemhelper/qmeegographicssystemhelper.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.cpp b/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.cpp
index b660eb3..37cc417 100644
--- a/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.cpp
+++ b/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.cpp
@@ -45,6 +45,7 @@
#include <private/qapplication_p.h>
#include <private/qgraphicssystem_runtime_p.h>
#include <private/qpixmap_raster_p.h>
+#include <private/qwindowsurface_gl_p.h>
#include "qmeegoruntime.h"
#include "qmeegoswitchevent.h"
@@ -153,3 +154,17 @@ void QMeeGoGraphicsSystemHelper::setTranslucent(bool translucent)
ENSURE_RUNNING_MEEGO;
QMeeGoRuntime::setTranslucent(translucent);
}
+
+void QMeeGoGraphicsSystemHelper::setSwapBehavior(SwapMode mode)
+{
+ ENSURE_RUNNING_MEEGO;
+
+ if (mode == AutomaticSwap)
+ QGLWindowSurface::swapBehavior = QGLWindowSurface::AutomaticSwap;
+ else if (mode == AlwaysFullSwap)
+ QGLWindowSurface::swapBehavior = QGLWindowSurface::AlwaysFullSwap;
+ else if (mode == AlwaysPartialSwap)
+ QGLWindowSurface::swapBehavior = QGLWindowSurface::AlwaysPartialSwap;
+ else if (mode == KillSwap)
+ QGLWindowSurface::swapBehavior = QGLWindowSurface::KillSwap;
+}