summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.p.agocs@nokia.com>2012-08-10 11:17:37 +0300
committerJørgen Lind <jorgen.lind@nokia.com>2012-08-13 07:58:54 +0200
commit5cfcc412a1f9a3b0d8c162d6e89630acd79c47a7 (patch)
tree0c77c16e75f98f5215c303b3bc7ba39f563051fe /examples
parentaa6ef53bb97617ffa068deb60563cdc7ac6785b3 (diff)
qwindow-compositor: Fix background image drawing
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>
Diffstat (limited to 'examples')
-rw-r--r--examples/qwindow-compositor/qwindowcompositor.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/examples/qwindow-compositor/qwindowcompositor.cpp b/examples/qwindow-compositor/qwindowcompositor.cpp
index b30c86d50..3bdeade1c 100644
--- a/examples/qwindow-compositor/qwindowcompositor.cpp
+++ b/examples/qwindow-compositor/qwindowcompositor.cpp
@@ -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);