Fixed compilation of Wayland plugin.
This commit is contained in:
parent
acf56efdc7
commit
f9442d7c51
@ -45,26 +45,26 @@
|
||||
#include "qwaylandwindow.h"
|
||||
#include <QtGui/private/qapplication_p.h>
|
||||
|
||||
void *QWaylandNativeInterface::nativeResourceForWidget(const QByteArray &resourceString, QWidget *widget)
|
||||
void *QWaylandNativeInterface::nativeResourceForWindow(const QByteArray &resourceString, QWindow *window)
|
||||
{
|
||||
QByteArray lowerCaseResource = resourceString.toLower();
|
||||
|
||||
if (lowerCaseResource == "display")
|
||||
return qPlatformScreenForWidget(widget)->display()->wl_display();
|
||||
return qPlatformScreenForWindow(window)->display()->wl_display();
|
||||
if (lowerCaseResource == "surface") {
|
||||
return ((QWaylandWindow *) widget->platformWindow())->wl_surface();
|
||||
return ((QWaylandWindow *) window->handle())->wl_surface();
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
QWaylandScreen * QWaylandNativeInterface::qPlatformScreenForWidget(QWidget *widget)
|
||||
QWaylandScreen * QWaylandNativeInterface::qPlatformScreenForWindow(QWindow *window)
|
||||
{
|
||||
QWaylandScreen *screen;
|
||||
|
||||
if (widget) {
|
||||
screen = static_cast<QWaylandScreen *>(QPlatformScreen::platformScreenForWidget(widget));
|
||||
if (window) {
|
||||
screen = static_cast<QWaylandScreen *>(QPlatformScreen::platformScreenForWindow(window));
|
||||
} else {
|
||||
screen = static_cast<QWaylandScreen *>(QApplicationPrivate::platformIntegration()->screens()[0]);
|
||||
}
|
||||
|
@ -49,11 +49,11 @@
|
||||
class QWaylandNativeInterface : public QPlatformNativeInterface
|
||||
{
|
||||
public:
|
||||
void *nativeResourceForWidget(const QByteArray &resourceString,
|
||||
QWidget *widget);
|
||||
void *nativeResourceForWindow(const QByteArray &resourceString,
|
||||
QWindow *window);
|
||||
|
||||
private:
|
||||
static QWaylandScreen *qPlatformScreenForWidget(QWidget *widget);
|
||||
static QWaylandScreen *qPlatformScreenForWindow(QWindow *window);
|
||||
};
|
||||
|
||||
|
||||
|
@ -33,6 +33,10 @@ QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_WAYLAND
|
||||
|
||||
INCLUDEPATH += $$PWD
|
||||
|
||||
QT += gui-private
|
||||
QT += opengl-private
|
||||
QT += core-private
|
||||
|
||||
include ($$PWD/gl_integration/gl_integration.pri)
|
||||
|
||||
include (../fontdatabases/genericunix/genericunix.pri)
|
||||
|
Loading…
Reference in New Issue
Block a user