tdf#149461 qt5: Provide a QWindow for OpenGL rendering on X11
When using the qt5 or kf5 VCL plugins on X11/XWayland (as can be forced using QT_QPA_PLUGIN=xcb on Wayland), ensure that a QWindow exists for the QtObjectWidget created in the QtObject ctor, as that is needed for OpenGL rendering. This makes OpenGL Impress slide transitions like the "Tiles" one work. Don't force native windows on Wayland, as that causes other issues, see also QtFrame::ResolveWindowHandle and the bugs referenced in there. Change-Id: I8fac34d2f1cc7cc723ad4570546276a05641dd88 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169348 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
This commit is contained in:
parent
b296b33cfb
commit
89372e6245
1 changed files with 5 additions and 0 deletions
|
@ -48,6 +48,11 @@ QtObject::QtObject(QtFrame* pParent, bool bShow)
|
|||
// which is not a problem with the QtMultimedia approach that the qt6 VCL plugin uses;
|
||||
// stay with the QtObjectWidget introduced in commit 4366e0605214260e55a937173b0c2e02225dc843
|
||||
m_pQWidget = new QtObjectWidget(*this);
|
||||
|
||||
// invoke QWidget::winId() to ensure a native window for OpenGL rendering is available on X11,
|
||||
// don't do it on Wayland, as that breaks rendering otherwise, s.a. QtFrame::ResolveWindowHandle
|
||||
if (QGuiApplication::platformName() == "xcb")
|
||||
m_pQWidget->winId();
|
||||
m_pQWindow = m_pQWidget->windowHandle();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue