diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-05-23 17:09:51 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-05-27 10:27:02 +0200 |
commit | 9d18bc40416b651340804f44ba5fae65f3bbbcfa (patch) | |
tree | 30fda9ba61854d5e5e0036dd1f883b911cf7b9ad /vcl/qt5/Qt5Object.cxx | |
parent | b1501d65674a74481b61a10a250febed77348f4a (diff) |
tdf#125271 under wayland without gtksink, try waylandsink
and if there is no videosink then give up
Change-Id: I6b60e7be1e77dbf5c4c277ccf47a4d121f3cd6a5
Reviewed-on: https://gerrit.libreoffice.org/72871
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/qt5/Qt5Object.cxx')
-rw-r--r-- | vcl/qt5/Qt5Object.cxx | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/vcl/qt5/Qt5Object.cxx b/vcl/qt5/Qt5Object.cxx index 0f3a4f29750a..deae5e2ad831 100644 --- a/vcl/qt5/Qt5Object.cxx +++ b/vcl/qt5/Qt5Object.cxx @@ -23,6 +23,7 @@ #include <Qt5Frame.hxx> #include <QtWidgets/QWidget> +#include <QtGui/QGuiApplication> #include <QtGui/QWindow> Qt5Object::Qt5Object(Qt5Frame* pParent, bool bShow) @@ -40,12 +41,28 @@ Qt5Object::Qt5Object(Qt5Frame* pParent, bool bShow) m_pQWidget->show(); m_aSystemData.nSize = sizeof(SystemEnvData); - m_aSystemData.aWindow = m_pQWindow->winId(); // ID of the embedded window m_aSystemData.aShellWindow = reinterpret_cast<sal_IntPtr>(this); //m_aSystemData.pSalFrame = this; //m_aSystemData.pWidget = m_pQWidget; //m_aSystemData.nScreen = m_nXScreen.getXScreen(); m_aSystemData.pToolkit = "qt5"; + m_aSystemData.pPlatformName = "xcb"; + const bool bWayland = QGuiApplication::platformName() == "wayland"; + if (!bWayland) + { + m_aSystemData.pPlatformName = "xcb"; + m_aSystemData.aWindow = m_pQWindow->winId(); // ID of the embedded window + } + else + { + m_aSystemData.pPlatformName = "wayland"; + // TODO implement as needed for Wayland, + // s.a. commit c0d4f3ad3307c which did this for gtk3 + // QPlatformNativeInterface* native = QGuiApplication::platformNativeInterface(); + // m_aSystemData.pDisplay = native->nativeResourceForWindow("display", nullptr); + // m_aSystemData.aWindow = reinterpret_cast<unsigned long>( + // native->nativeResourceForWindow("surface", m_pQWidget->windowHandle())); + } } void Qt5Object::ResetClipRegion() |