Update to match qtbase changes to platform headers
Change-Id: I8e39d87361728c81b526f1ad89b45136500c9913 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
This commit is contained in:
parent
ea199834ce
commit
74d7982b94
@ -56,7 +56,6 @@ qt_add_module(WaylandClient
|
|||||||
LIBRARIES
|
LIBRARIES
|
||||||
Qt::CorePrivate
|
Qt::CorePrivate
|
||||||
Qt::GuiPrivate
|
Qt::GuiPrivate
|
||||||
Qt::PlatformHeadersPrivate
|
|
||||||
PUBLIC_LIBRARIES
|
PUBLIC_LIBRARIES
|
||||||
Qt::Core
|
Qt::Core
|
||||||
Qt::Gui
|
Qt::Gui
|
||||||
|
@ -3,8 +3,6 @@ MODULE = waylandclient
|
|||||||
|
|
||||||
QT += core-private gui-private
|
QT += core-private gui-private
|
||||||
|
|
||||||
QT_PRIVATE += platformheaders-private
|
|
||||||
|
|
||||||
# We have a bunch of C code with casts, so we can't have this option
|
# We have a bunch of C code with casts, so we can't have this option
|
||||||
QMAKE_CXXFLAGS_WARN_ON -= -Wcast-qual
|
QMAKE_CXXFLAGS_WARN_ON -= -Wcast-qual
|
||||||
|
|
||||||
|
@ -55,8 +55,6 @@
|
|||||||
#include <QtWaylandClient/private/qwaylandvulkanwindow_p.h>
|
#include <QtWaylandClient/private/qwaylandvulkanwindow_p.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <QtPlatformHeaders/private/qwaylandwindowfunctions_p.h>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
namespace QtWaylandClient {
|
namespace QtWaylandClient {
|
||||||
@ -194,44 +192,6 @@ void QWaylandNativeInterface::emitWindowPropertyChanged(QPlatformWindow *window,
|
|||||||
emit windowPropertyChanged(window,name);
|
emit windowPropertyChanged(window,name);
|
||||||
}
|
}
|
||||||
|
|
||||||
QFunctionPointer QWaylandNativeInterface::platformFunction(const QByteArray &resource) const
|
|
||||||
{
|
|
||||||
if (resource == QWaylandWindowFunctions::setSyncIdentifier()) {
|
|
||||||
return QFunctionPointer(setSync);
|
|
||||||
} else if (resource == QWaylandWindowFunctions::setDeSyncIdentifier()) {
|
|
||||||
return QFunctionPointer(setDeSync);
|
|
||||||
} else if (resource == QWaylandWindowFunctions::isSyncIdentifier()) {
|
|
||||||
return QFunctionPointer(isSync);
|
|
||||||
}
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void QWaylandNativeInterface::setSync(QWindow *window)
|
|
||||||
{
|
|
||||||
QWaylandWindow *ww = static_cast<QWaylandWindow*>(window->handle());
|
|
||||||
if (ww->subSurfaceWindow()) {
|
|
||||||
ww->subSurfaceWindow()->setSync();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void QWaylandNativeInterface::setDeSync(QWindow *window)
|
|
||||||
{
|
|
||||||
QWaylandWindow *ww = static_cast<QWaylandWindow*>(window->handle());
|
|
||||||
if (ww->subSurfaceWindow()) {
|
|
||||||
ww->subSurfaceWindow()->setDeSync();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool QWaylandNativeInterface::isSync(QWindow *window)
|
|
||||||
{
|
|
||||||
QWaylandWindow *ww = static_cast<QWaylandWindow*>(window->handle());
|
|
||||||
if (ww->subSurfaceWindow()) {
|
|
||||||
return ww->subSurfaceWindow()->isSync();
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
@ -82,15 +82,9 @@ public:
|
|||||||
|
|
||||||
void emitWindowPropertyChanged(QPlatformWindow *window, const QString &name);
|
void emitWindowPropertyChanged(QPlatformWindow *window, const QString &name);
|
||||||
|
|
||||||
QFunctionPointer platformFunction(const QByteArray &resource) const override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QWaylandIntegration *m_integration = nullptr;
|
QWaylandIntegration *m_integration = nullptr;
|
||||||
QHash<QPlatformWindow*, QVariantMap> m_windowProperties;
|
QHash<QPlatformWindow*, QVariantMap> m_windowProperties;
|
||||||
|
|
||||||
static void setSync(QWindow *window);
|
|
||||||
static void setDeSync(QWindow *window);
|
|
||||||
static bool isSync(QWindow *window);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user