From: Laszlo Agocs Date: Fri, 10 Aug 2012 08:17:37 +0000 (+0300) Subject: qwindow-compositor: Fix background image drawing X-Git-Tag: 1.0_branch~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5cfcc412a1f9a3b0d8c162d6e89630acd79c47a7;p=profile%2Fivi%2Fqtwayland.git 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 Reviewed-by: Jørgen Lind --- diff --git a/examples/qwindow-compositor/qwindowcompositor.cpp b/examples/qwindow-compositor/qwindowcompositor.cpp index b30c86d..3bdeade 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);