From 9d3462dff33b771b71ef16d797ee01ea10afebbe Mon Sep 17 00:00:00 2001
From: Johan Klokkhammer Helsing <johan.helsing@qt.io>
Date: Thu, 23 Jun 2016 11:53:52 +0200
Subject: [PATCH] Client: Call parent requestUpdate after changing subsurface
 position

Calling setPosition on a child window would not send the appropriate commit
request after the wl_subsurface.set_position request.

Task-number: QTBUG-52118
Change-Id: I792016ce7e0a5a2efd3a32a98727b43ee0275b0e
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
---
 src/client/qwaylandwindow.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index e504de37..4c00110b 100644
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp
@@ -262,6 +262,7 @@ void QWaylandWindow::setGeometry_helper(const QRect &rect)
     if (mSubSurfaceWindow) {
         QMargins m = QPlatformWindow::parent()->frameMargins();
         mSubSurfaceWindow->set_position(rect.x() + m.left(), rect.y() + m.top());
+        mSubSurfaceWindow->parent()->window()->requestUpdate();
     } else if (shellSurface() && window()->transientParent() && window()->type() != Qt::Popup)
         shellSurface()->updateTransientParent(window()->transientParent());
 }
@@ -638,6 +639,8 @@ bool QWaylandWindow::createDecoration()
             QMargins m = frameMargins();
             subsurf->set_position(pos.x() + m.left(), pos.y() + m.top());
         }
+        if (!mChildren.isEmpty())
+            window()->requestUpdate();
     }
 
     return mWindowDecoration;
-- 
GitLab