Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MAYA-132068: Unusable UI when docking with QWebEngineView (qtbase) (q…
…t#104) * rhi: d3d11: Flush() when destroying a swapchain Task-number: QTBUG-120276 Pick-to: 6.7 6.6 6.5 Change-Id: Iaf79c4dcf60d9a52bd562fd94976402cf570147d Reviewed-by: Tor Arne Vestbø <[email protected]> (cherry picked from commit cff5a49) * widgets: Invalidate RHI swapchain when window moves to new top level When a QWidget with an associated RHI swapchain (via its QWindow) is moved to a different top level window, that top level window has its own backing store, and QBackingStoreRhiSupport, which doesn't know anything about the fact that the window already has an associated swap chain in the original top level window's QBackingStoreRhiSupport. As having multiple swap chains for the same window is not supported on all RHI backends (Vulkan and DX in particular), we need to throw away the swap chain when detecting that the window is moved to a new top level. We do this by hooking into the existing WindowAboutToChangeInternal event delivery to renderToTexture children, which now delivers the event both to renderToTexture QWidget children as well as QWindows in the hierarchy. The condition of when to deliver the event has been updated to reflect whether the top level uses RHI for flushing, instead of only including renderToTexture children, as the former also includes setting QT_WIDGETS_RHI=1 explicitly. The event is then caught by QBackingStoreRhiSupportWindowWatcher, and handled the same way as for SurfaceAboutToBeDestroyed. Renaming qSendWindowChangeToTextureChildrenRecursively would make sense at this point, but to make cherry-picks easier we keep the current name for now. Fixes: QTBUG-120276 Pick-to: 6.7 6.5 Change-Id: Ic4c60e89be985f12a84e9f893c299e602b70851a Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Laszlo Agocs <[email protected]> (cherry picked from commit 1bd7554) rename sendWindowChangeToTextureChildrenRecursively Change-Id: I457f50b68d5813e3ef09c31749dc3db8d0dc6822 --------- Co-authored-by: Laszlo Agocs <[email protected]> Co-authored-by: Tor Arne Vestbø <[email protected]>
- Loading branch information