qwindow-compositor: Fix background image drawing
authorLaszlo Agocs <laszlo.p.agocs@nokia.com>
Fri, 10 Aug 2012 08:17:37 +0000 (11:17 +0300)
committerJørgen Lind <jorgen.lind@nokia.com>
Mon, 13 Aug 2012 05:58:54 +0000 (07:58 +0200)
Make it work correctly with -nofullscreen and prevent it from being
shown upside-down (hard to notice with the default background image
but becomes obvious when replacing background.jpg with something else)

Change-Id: I372ba16818dd452c965febd551da0e35d114b920
Reviewed-by: Elvis Lee <kwangwoong.lee@lge.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
examples/qwindow-compositor/qwindowcompositor.cpp

index b30c86d..3bdeade 100644 (file)
@@ -267,8 +267,11 @@ void QWindowCompositor::render()
     m_backgroundTexture = m_textureCache->bindTexture(QOpenGLContext::currentContext(),m_backgroundImage);
 
     m_textureBlitter->bind();
-    //Draw the background Image texture
-    m_textureBlitter->drawTexture(m_backgroundTexture, window()->geometry(), window()->size(), 0, true, true);
+    // Draw the background image texture
+    m_textureBlitter->drawTexture(m_backgroundTexture,
+                                  QRect(QPoint(0, 0), m_backgroundImage.size()),
+                                  window()->size(),
+                                  0, false, true);
 
     foreach (WaylandSurface *surface, m_surfaces) {
         GLuint texture = composeSurface(surface);