summaryrefslogtreecommitdiffstats
path: root/vcl/qt5/QtFrame.cxx
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 11:47:06 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 11:47:06 +0000
commit8ceff95c69cf9bd9ff5ab3a4b5689925b8bd6a59 (patch)
treeca2b0cc4fba88107f5f6e740285184a061011866 /vcl/qt5/QtFrame.cxx
parentAdding debian version 4:24.2.3-2. (diff)
downloadlibreoffice-8ceff95c69cf9bd9ff5ab3a4b5689925b8bd6a59.tar.xz
libreoffice-8ceff95c69cf9bd9ff5ab3a4b5689925b8bd6a59.zip
Merging upstream version 4:24.2.4.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vcl/qt5/QtFrame.cxx')
-rw-r--r--vcl/qt5/QtFrame.cxx12
1 files changed, 11 insertions, 1 deletions
diff --git a/vcl/qt5/QtFrame.cxx b/vcl/qt5/QtFrame.cxx
index 6aff814aac..1c3839a287 100644
--- a/vcl/qt5/QtFrame.cxx
+++ b/vcl/qt5/QtFrame.cxx
@@ -35,6 +35,7 @@
#include <QtX11Support.hxx>
#endif
+#include <QtCore/QLibraryInfo>
#include <QtCore/QMimeData>
#include <QtCore/QPoint>
#include <QtCore/QSize>
@@ -1339,8 +1340,17 @@ void QtFrame::ResolveWindowHandle(SystemEnvData& rData) const
if (!rData.pWidget)
return;
assert(rData.platform != SystemEnvData::Platform::Invalid);
- if (rData.platform != SystemEnvData::Platform::Wayland)
+ // Calling QWidget::winId() implicitly enables native windows to be used instead
+ // of "alien widgets" that don't have a native widget asscoiated with them,
+ // s. https://doc.qt.io/qt-6/qwidget.html#native-widgets-vs-alien-widgets
+ // Avoid native widgets with Qt 5 on Wayland and with Qt 6 altogether as they
+ // cause unsresponsive UI, s. tdf#122293/QTBUG-75766 and tdf#160565
+ // (for qt5 xcb, they're needed for video playback)
+ if (rData.platform != SystemEnvData::Platform::Wayland
+ && QLibraryInfo::version().majorVersion() < 6)
+ {
rData.SetWindowHandle(static_cast<QWidget*>(rData.pWidget)->winId());
+ }
}
bool QtFrame::GetUseReducedAnimation() const { return GetQtInstance()->GetUseReducedAnimation(); }