Make the wayland plugin compile

This commit is contained in:
Paul Olav Tvete 2011-04-29 16:02:36 +02:00
parent 6e2bbb58fd
commit a90d1b432c
41 changed files with 88 additions and 91 deletions

View File

@ -85,7 +85,7 @@ public:
// input methods
virtual void pointerEvent(const QMouseEvent & event) { Q_UNUSED(event); }
virtual void changeCursor(QCursor * widgetCursor, QWidget * widget) = 0;
virtual void changeCursor(QCursor * widgetCursor, QWindow * widget) = 0;
protected:
QPlatformScreen* screen; // Where to request an update

View File

@ -818,7 +818,7 @@ void qt_qpa_set_cursor(QWidget * w, bool force)
} while (0);
foreach (QWeakPointer<QPlatformCursor> cursor, QPlatformCursorPrivate::getInstances())
if (cursor)
cursor.data()->changeCursor(&cursorCursor, cursorWidget);
cursor.data()->changeCursor(&cursorCursor, cursorWidget->windowHandle());
}
#endif //QT_NO_CURSOR

View File

@ -44,7 +44,7 @@
class QWaylandWindow;
class QWaylandDisplay;
class QWidget;
class QWindow;
class QWaylandGLIntegration
{
@ -54,7 +54,7 @@ public:
virtual void initialize() = 0;
virtual QWaylandWindow *createEglWindow(QWidget *widget) = 0;
virtual QWaylandWindow *createEglWindow(QWindow *window) = 0;
static QWaylandGLIntegration *createGLIntegration(QWaylandDisplay *waylandDisplay);
};

View File

@ -47,6 +47,7 @@
#include <QtOpenGL/QGLFramebufferObject>
#include <QtOpenGL/QGLContext>
#include <QPlatformGLContext>
#include <QtOpenGL/private/qglengineshadermanager_p.h>
@ -133,9 +134,9 @@ static void blitTexture(QGLContext *ctx, GLuint texture, const QSize &viewport,
drawTexture(r, texture, texSize, sourceRect);
}
QWaylandGLWindowSurface::QWaylandGLWindowSurface(QWidget *window)
QWaylandGLWindowSurface::QWaylandGLWindowSurface(QWindow *window)
: QWindowSurface(window)
, mDisplay(QWaylandScreen::waylandScreenFromWidget(window)->display())
, mDisplay(QWaylandScreen::waylandScreenFromWindow(window)->display())
, mPaintDevice(0)
{
@ -153,30 +154,29 @@ QPaintDevice *QWaylandGLWindowSurface::paintDevice()
void QWaylandGLWindowSurface::beginPaint(const QRegion &)
{
window()->platformWindow()->glContext()->makeCurrent();
window()->handle()->glContext()->makeCurrent();
glClearColor(0,0,0,0xff);
glClear(GL_COLOR_BUFFER_BIT);
}
void QWaylandGLWindowSurface::flush(QWidget *widget, const QRegion &region, const QPoint &offset)
void QWaylandGLWindowSurface::flush(QWindow *window, const QRegion &region, const QPoint &offset)
{
Q_UNUSED(offset);
Q_UNUSED(region);
QWaylandWindow *ww = (QWaylandWindow *) widget->platformWindow();
if (mPaintDevice->isBound())
mPaintDevice->release();
QRect rect(0,0,size().width(),size().height());
QGLContext *ctx = QGLContext::fromPlatformGLContext(ww->glContext());
QGLContext *ctx = QGLContext::fromWindowContext(window->glContext());
blitTexture(ctx,mPaintDevice->texture(),size(),mPaintDevice->size(),rect,rect);
ww->glContext()->swapBuffers();
window->glContext()->swapBuffers();
}
void QWaylandGLWindowSurface::resize(const QSize &size)
{
QWindowSurface::resize(size);
window()->platformWindow()->glContext()->makeCurrent();
window()->glContext()->makeCurrent();
delete mPaintDevice;
mPaintDevice = new QGLFramebufferObject(size);
}

View File

@ -51,13 +51,13 @@ class QGLFramebufferObject;
class QWaylandGLWindowSurface : public QWindowSurface
{
public:
QWaylandGLWindowSurface(QWidget *window);
QWaylandGLWindowSurface(QWindow *window);
~QWaylandGLWindowSurface();
void beginPaint(const QRegion &);
QPaintDevice *paintDevice();
void flush(QWidget *widget, const QRegion &region, const QPoint &offset);
void flush(QWindow *window, const QRegion &region, const QPoint &offset);
void resize(const QSize &size);

View File

@ -43,7 +43,6 @@
#define QWAYLANDREADBACKEGLGLCONTEXT_H
#include <QPlatformGLContext>
#include <QtGui/QWidget>
#include "qwaylandreadbackeglintegration.h"
#include "qwaylandreadbackeglwindow.h"

View File

@ -81,7 +81,7 @@ void QWaylandReadbackEglIntegration::initialize()
}
}
QWaylandWindow * QWaylandReadbackEglIntegration::createEglWindow(QWidget *widget)
QWaylandWindow * QWaylandReadbackEglIntegration::createEglWindow(QWindow *window)
{
return new QWaylandReadbackEglWindow(widget,this);
}

View File

@ -48,7 +48,6 @@
#include <QtCore/QDataStream>
#include <QtCore/QMetaType>
#include <QtCore/QVariant>
#include <QtGui/QWidget>
#include <X11/Xlib.h>
@ -61,7 +60,7 @@ public:
~QWaylandReadbackEglIntegration();
void initialize();
QWaylandWindow *createEglWindow(QWidget *widget);
QWaylandWindow *createEglWindow(QWindow *window);
QWaylandDisplay *waylandDisplay() const;
Display *xDisplay() const;

View File

@ -43,7 +43,7 @@
#include "qwaylandreadbackeglcontext.h"
QWaylandReadbackEglWindow::QWaylandReadbackEglWindow(QWidget *window, QWaylandReadbackEglIntegration *eglIntegration)
QWaylandReadbackEglWindow::QWaylandReadbackEglWindow(QWindow *window, QWaylandReadbackEglIntegration *eglIntegration)
: QWaylandShmWindow(window)
, mEglIntegration(eglIntegration)
, mContext(0)

View File

@ -50,7 +50,7 @@ class QWaylandReadbackEglContext;
class QWaylandReadbackEglWindow : public QWaylandShmWindow
{
public:
QWaylandReadbackEglWindow(QWidget *window, QWaylandReadbackEglIntegration *eglIntegration);
QWaylandReadbackEglWindow(QWindow *window, QWaylandReadbackEglIntegration *eglIntegration);
WindowType windowType() const;

View File

@ -66,9 +66,9 @@ void QWaylandReadbackGlxIntegration::initialize()
{
}
QWaylandWindow * QWaylandReadbackGlxIntegration::createEglWindow(QWidget *widget)
QWaylandWindow * QWaylandReadbackGlxIntegration::createEglWindow(QWindow *window)
{
return new QWaylandReadbackGlxWindow(widget,this);
return new QWaylandReadbackGlxWindow(window,this);
}
QWaylandGLIntegration * QWaylandGLIntegration::createGLIntegration(QWaylandDisplay *waylandDisplay)

View File

@ -48,7 +48,7 @@
#include <QtCore/QDataStream>
#include <QtCore/QMetaType>
#include <QtCore/QVariant>
#include <QtGui/QWidget>
#include <QtGui/QWindow>
#include <X11/Xlib.h>
@ -60,7 +60,7 @@ public:
void initialize();
QWaylandWindow *createEglWindow(QWidget *widget);
QWaylandWindow *createEglWindow(QWindow *window);
QWaylandDisplay *waylandDisplay() const;

View File

@ -41,7 +41,7 @@
#include "qwaylandreadbackglxwindow.h"
QWaylandReadbackGlxWindow::QWaylandReadbackGlxWindow(QWidget *window, QWaylandReadbackGlxIntegration *glxIntegration)
QWaylandReadbackGlxWindow::QWaylandReadbackGlxWindow(QWindow *window, QWaylandReadbackGlxIntegration *glxIntegration)
: QWaylandShmWindow(window)
, mGlxIntegration(glxIntegration)
, mContext(0)

View File

@ -49,7 +49,7 @@
class QWaylandReadbackGlxWindow : public QWaylandShmWindow
{
public:
QWaylandReadbackGlxWindow(QWidget *window, QWaylandReadbackGlxIntegration *glxIntegration);
QWaylandReadbackGlxWindow(QWindow *window, QWaylandReadbackGlxIntegration *glxIntegration);
WindowType windowType() const;
QPlatformGLContext *glContext() const;

View File

@ -74,7 +74,7 @@ void QWaylandEglIntegration::initialize()
}
}
QWaylandWindow *QWaylandEglIntegration::createEglWindow(QWidget *window)
QWaylandWindow *QWaylandEglIntegration::createEglWindow(QWindow *window)
{
return new QWaylandEglWindow(window);
}

View File

@ -47,7 +47,7 @@
#include "qwaylandeglinclude.h"
class QWaylandWindow;
class QWidget;
class QWindow;
class QWaylandEglIntegration : public QWaylandGLIntegration
{
@ -57,7 +57,7 @@ public:
void initialize();
QWaylandWindow *createEglWindow(QWidget *window);
QWaylandWindow *createEglWindow(QWindow *window);
EGLDisplay eglDisplay() const;
struct wl_egl_display *nativeDisplay() const;

View File

@ -44,7 +44,7 @@
#include "qwaylandscreen.h"
#include "qwaylandglcontext.h"
QWaylandEglWindow::QWaylandEglWindow(QWidget *window)
QWaylandEglWindow::QWaylandEglWindow(QWindow *window)
: QWaylandWindow(window)
, mGLContext(0)
, mWaylandEglWindow(0)

View File

@ -51,7 +51,7 @@ class QWaylandGLContext;
class QWaylandEglWindow : public QWaylandWindow
{
public:
QWaylandEglWindow(QWidget *window);
QWaylandEglWindow(QWindow *window);
~QWaylandEglWindow();
WindowType windowType() const;
void setGeometry(const QRect &rect);

View File

@ -70,9 +70,9 @@ void QWaylandXCompositeEGLIntegration::initialize()
{
}
QWaylandWindow * QWaylandXCompositeEGLIntegration::createEglWindow(QWidget *widget)
QWaylandWindow * QWaylandXCompositeEGLIntegration::createEglWindow(QWindow *window)
{
return new QWaylandXCompositeEGLWindow(widget,this);
return new QWaylandXCompositeEGLWindow(window,this);
}
Display * QWaylandXCompositeEGLIntegration::xDisplay() const

View File

@ -49,7 +49,7 @@
#include <QtCore/QDataStream>
#include <QtCore/QMetaType>
#include <QtCore/QVariant>
#include <QtGui/QWidget>
#include <QtGui/QWindow>
#include <QWaitCondition>
@ -66,7 +66,7 @@ public:
void initialize();
QWaylandWindow *createEglWindow(QWidget *widget);
QWaylandWindow *createEglWindow(QWindow *window);
QWaylandDisplay *waylandDisplay() const;
struct wl_xcomposite *waylandXComposite() const;

View File

@ -43,7 +43,7 @@
#include <QtCore/QDebug>
QWaylandXCompositeEGLWindow::QWaylandXCompositeEGLWindow(QWidget *window, QWaylandXCompositeEGLIntegration *glxIntegration)
QWaylandXCompositeEGLWindow::QWaylandXCompositeEGLWindow(QWindow *window, QWaylandXCompositeEGLIntegration *glxIntegration)
: QWaylandWindow(window)
, mGlxIntegration(glxIntegration)
, mContext(0)

View File

@ -49,7 +49,7 @@
class QWaylandXCompositeEGLWindow : public QWaylandWindow
{
public:
QWaylandXCompositeEGLWindow(QWidget *window, QWaylandXCompositeEGLIntegration *glxIntegration);
QWaylandXCompositeEGLWindow(QWindow *window, QWaylandXCompositeEGLIntegration *glxIntegration);
WindowType windowType() const;
QPlatformGLContext *glContext() const;

View File

@ -46,6 +46,7 @@
#include "wayland-xcomposite-client-protocol.h"
#include <QtCore/QDebug>
#include <QtGui/QRegion>
#include <X11/extensions/Xcomposite.h>
@ -55,7 +56,7 @@ QWaylandXCompositeGLXContext::QWaylandXCompositeGLXContext(QWaylandXCompositeGLX
, mWindow(window)
, mBuffer(0)
, mXWindow(0)
, mConfig(qglx_findConfig(glxIntegration->xDisplay(),glxIntegration->screen(),window->widget()->platformWindowFormat()))
, mConfig(qglx_findConfig(glxIntegration->xDisplay(),glxIntegration->screen(),window->window()->format()))
, mWaitingForSyncCallback(false)
{
XVisualInfo *visualInfo = glXGetVisualFromFBConfig(glxIntegration->xDisplay(),mConfig);
@ -90,7 +91,7 @@ void * QWaylandXCompositeGLXContext::getProcAddress(const QString &procName)
return (void *) glXGetProcAddress(reinterpret_cast<GLubyte *>(procName.toLatin1().data()));
}
QPlatformWindowFormat QWaylandXCompositeGLXContext::platformWindowFormat() const
QWindowFormat QWaylandXCompositeGLXContext::windowFormat() const
{
return qglx_platformWindowFromGLXFBConfig(mGlxIntegration->xDisplay(),mConfig,mContext);
}

View File

@ -64,7 +64,7 @@ public:
void swapBuffers();
void* getProcAddress(const QString& procName);
QPlatformWindowFormat platformWindowFormat() const;
QWindowFormat windowFormat() const;
void geometryChanged();

View File

@ -70,9 +70,9 @@ void QWaylandXCompositeGLXIntegration::initialize()
{
}
QWaylandWindow * QWaylandXCompositeGLXIntegration::createEglWindow(QWidget *widget)
QWaylandWindow * QWaylandXCompositeGLXIntegration::createEglWindow(QWindow *window)
{
return new QWaylandXCompositeGLXWindow(widget,this);
return new QWaylandXCompositeGLXWindow(window,this);
}
Display * QWaylandXCompositeGLXIntegration::xDisplay() const

View File

@ -49,7 +49,7 @@
#include <QtCore/QDataStream>
#include <QtCore/QMetaType>
#include <QtCore/QVariant>
#include <QtGui/QWidget>
#include <QtGui/QWindow>
#include <X11/Xlib.h>
@ -63,7 +63,7 @@ public:
void initialize();
QWaylandWindow *createEglWindow(QWidget *widget);
QWaylandWindow *createEglWindow(QWindow *window);
QWaylandDisplay *waylandDisplay() const;
struct wl_xcomposite *waylandXComposite() const;

View File

@ -43,7 +43,7 @@
#include <QtCore/QDebug>
QWaylandXCompositeGLXWindow::QWaylandXCompositeGLXWindow(QWidget *window, QWaylandXCompositeGLXIntegration *glxIntegration)
QWaylandXCompositeGLXWindow::QWaylandXCompositeGLXWindow(QWindow *window, QWaylandXCompositeGLXIntegration *glxIntegration)
: QWaylandWindow(window)
, mGlxIntegration(glxIntegration)
, mContext(0)

View File

@ -49,7 +49,7 @@
class QWaylandXCompositeGLXWindow : public QWaylandWindow
{
public:
QWaylandXCompositeGLXWindow(QWidget *window, QWaylandXCompositeGLXIntegration *glxIntegration);
QWaylandXCompositeGLXWindow(QWindow *window, QWaylandXCompositeGLXIntegration *glxIntegration);
WindowType windowType() const;
QPlatformGLContext *glContext() const;

View File

@ -108,11 +108,11 @@ QWaylandCursor::QWaylandCursor(QWaylandScreen *screen)
{
}
void QWaylandCursor::changeCursor(QCursor *cursor, QWidget *widget)
void QWaylandCursor::changeCursor(QCursor *cursor, QWindow *window)
{
const struct pointer_image *p;
if (widget == NULL)
if (window == NULL)
return;
p = NULL;

View File

@ -52,7 +52,7 @@ class QWaylandCursor : QPlatformCursor {
public:
QWaylandCursor(QWaylandScreen *screen);
void changeCursor(QCursor *cursor, QWidget *widget);
void changeCursor(QCursor *cursor, QWindow *window);
QWaylandShmBuffer *mBuffer;
QWaylandDisplay *mDisplay;
};

View File

@ -104,7 +104,7 @@ void QWaylandInputDevice::inputHandleMotion(void *data,
inputDevice->mSurfacePos = QPoint(surface_x, surface_y);
inputDevice->mGlobalPos = QPoint(x, y);
inputDevice->mTime = time;
QWindowSystemInterface::handleMouseEvent(window->widget(),
QWindowSystemInterface::handleMouseEvent(window->window(),
time,
inputDevice->mSurfacePos,
inputDevice->mGlobalPos,
@ -140,7 +140,7 @@ void QWaylandInputDevice::inputHandleButton(void *data,
inputDevice->mButtons &= ~qt_button;
inputDevice->mTime = time;
QWindowSystemInterface::handleMouseEvent(window->widget(),
QWindowSystemInterface::handleMouseEvent(window->window(),
time,
inputDevice->mSurfacePos,
inputDevice->mGlobalPos,
@ -254,7 +254,7 @@ void QWaylandInputDevice::inputHandleKey(void *data,
code, sym, s[0], (int) inputDevice->mModifiers);
if (window) {
QWindowSystemInterface::handleKeyEvent(window->widget(),
QWindowSystemInterface::handleKeyEvent(window->window(),
time, type, sym,
inputDevice->mModifiers,
QString::fromLatin1(s));
@ -277,13 +277,13 @@ void QWaylandInputDevice::inputHandlePointerFocus(void *data,
if (inputDevice->mPointerFocus) {
window = inputDevice->mPointerFocus;
QWindowSystemInterface::handleLeaveEvent(window->widget());
QWindowSystemInterface::handleLeaveEvent(window->window());
inputDevice->mPointerFocus = NULL;
}
if (surface) {
window = (QWaylandWindow *) wl_surface_get_user_data(surface);
QWindowSystemInterface::handleEnterEvent(window->widget());
QWindowSystemInterface::handleEnterEvent(window->window());
inputDevice->mPointerFocus = window;
}
@ -315,7 +315,7 @@ void QWaylandInputDevice::inputHandleKeyboardFocus(void *data,
if (surface) {
window = (QWaylandWindow *) wl_surface_get_user_data(surface);
inputDevice->mKeyboardFocus = window;
QWindowSystemInterface::handleWindowActivated(window->widget());
QWindowSystemInterface::handleWindowActivated(window->window());
} else {
inputDevice->mKeyboardFocus = NULL;
QWindowSystemInterface::handleWindowActivated(0);

View File

@ -49,7 +49,7 @@
#include <QtGui/QWindowSystemInterface>
#include <QtGui/QPlatformCursor>
#include <QtGui/QPlatformWindowFormat>
#include <QtGui/QWindowFormat>
#include <QtGui/private/qpixmap_raster_p.h>
#ifdef QT_WAYLAND_GL_SUPPORT
@ -89,27 +89,25 @@ QPixmapData *QWaylandIntegration::createPixmapData(QPixmapData::PixelType type)
return new QRasterPixmapData(type);
}
QPlatformWindow *QWaylandIntegration::createPlatformWindow(QWidget *widget, WId winId) const
QPlatformWindow *QWaylandIntegration::createPlatformWindow(QWindow *window) const
{
Q_UNUSED(winId);
#ifdef QT_WAYLAND_GL_SUPPORT
bool useOpenGL = mUseOpenGL || (widget->platformWindowFormat().windowApi() == QPlatformWindowFormat::OpenGL);
bool useOpenGL = mUseOpenGL || window->surfaceType() == QWindow::OpenGLSurface;
if (useOpenGL)
return mDisplay->eglIntegration()->createEglWindow(widget);
return mDisplay->eglIntegration()->createEglWindow(window);
#endif
return new QWaylandShmWindow(widget);
return new QWaylandShmWindow(window);
}
QWindowSurface *QWaylandIntegration::createWindowSurface(QWidget *widget, WId winId) const
QWindowSurface *QWaylandIntegration::createWindowSurface(QWindow *window, WId winId) const
{
Q_UNUSED(winId);
Q_UNUSED(winId);
#ifdef QT_WAYLAND_GL_SUPPORT
bool useOpenGL = mUseOpenGL || (widget->platformWindowFormat().windowApi() == QPlatformWindowFormat::OpenGL);
bool useOpenGL = mUseOpenGL || window->surfaceType() == QWindow::OpenGLSurface;
if (useOpenGL)
return new QWaylandGLWindowSurface(widget);
return new QWaylandGLWindowSurface(window);
#endif
return new QWaylandShmWindowSurface(widget);
return new QWaylandShmWindowSurface(window);
}
QPlatformFontDatabase *QWaylandIntegration::fontDatabase() const

View File

@ -56,8 +56,8 @@ public:
bool hasCapability(QPlatformIntegration::Capability cap) const;
QPixmapData *createPixmapData(QPixmapData::PixelType type) const;
QPlatformWindow *createPlatformWindow(QWidget *widget, WId winId) const;
QWindowSurface *createWindowSurface(QWidget *widget, WId winId) const;
QPlatformWindow *createPlatformWindow(QWindow *window) const;
QWindowSurface *createWindowSurface(QWindow *window, WId winId) const;
QList<QPlatformScreen *> screens() const;

View File

@ -81,9 +81,9 @@ QImage::Format QWaylandScreen::format() const
return mFormat;
}
QWaylandScreen * QWaylandScreen::waylandScreenFromWidget(QWidget *widget)
QWaylandScreen * QWaylandScreen::waylandScreenFromWindow(QWindow *window)
{
QPlatformScreen *platformScreen = QPlatformScreen::platformScreenForWidget(widget);
QPlatformScreen *platformScreen = QPlatformScreen::platformScreenForWindow(window);
return static_cast<QWaylandScreen *>(platformScreen);
}

View File

@ -62,7 +62,7 @@ public:
wl_visual *visual() const;
static QWaylandScreen *waylandScreenFromWidget(QWidget *widget);
static QWaylandScreen *waylandScreenFromWindow(QWindow *window);
private:
QWaylandDisplay *mWaylandDisplay;

View File

@ -91,10 +91,10 @@ QWaylandShmBuffer::~QWaylandShmBuffer(void)
wl_buffer_destroy(mBuffer);
}
QWaylandShmWindowSurface::QWaylandShmWindowSurface(QWidget *window)
QWaylandShmWindowSurface::QWaylandShmWindowSurface(QWindow *window)
: QWindowSurface(window)
, mBuffer(0)
, mDisplay(QWaylandScreen::waylandScreenFromWidget(window)->display())
, mDisplay(QWaylandScreen::waylandScreenFromWindow(window)->display())
{
}
@ -109,27 +109,27 @@ QPaintDevice *QWaylandShmWindowSurface::paintDevice()
void QWaylandShmWindowSurface::beginPaint(const QRegion &)
{
QWaylandShmWindow *waylandWindow = static_cast<QWaylandShmWindow *>(window()->platformWindow());
QWaylandShmWindow *waylandWindow = static_cast<QWaylandShmWindow *>(window()->handle());
Q_ASSERT(waylandWindow->windowType() == QWaylandWindow::Shm);
waylandWindow->waitForFrameSync();
}
void QWaylandShmWindowSurface::flush(QWidget *widget, const QRegion &region, const QPoint &offset)
void QWaylandShmWindowSurface::flush(QWindow *window, const QRegion &region, const QPoint &offset)
{
Q_UNUSED(widget);
Q_UNUSED(window);
Q_UNUSED(offset);
QWaylandShmWindow *waylandWindow = static_cast<QWaylandShmWindow *>(window()->platformWindow());
QWaylandShmWindow *waylandWindow = static_cast<QWaylandShmWindow *>(window->handle());
Q_ASSERT(waylandWindow->windowType() == QWaylandWindow::Shm);
waylandWindow->damage(region);
}
void QWaylandShmWindowSurface::resize(const QSize &size)
{
QWaylandShmWindow *waylandWindow = static_cast<QWaylandShmWindow *>(window()->platformWindow());
QWaylandShmWindow *waylandWindow = static_cast<QWaylandShmWindow *>(window()->handle());
Q_ASSERT(waylandWindow->windowType() == QWaylandWindow::Shm);
QWindowSurface::resize(size);
QImage::Format format = QPlatformScreen::platformScreenForWidget(window())->format();
QImage::Format format = QPlatformScreen::platformScreenForWindow(window())->format();
if (mBuffer != NULL && mBuffer->size() == size)
return;

View File

@ -44,7 +44,7 @@
#include "qwaylandbuffer.h"
#include <QtGui/private/qwindowsurface_p.h>
#include <QtGui/QImage>
#include <QtGui/QPlatformWindow>
QT_BEGIN_NAMESPACE
@ -65,11 +65,11 @@ private:
class QWaylandShmWindowSurface : public QWindowSurface
{
public:
QWaylandShmWindowSurface(QWidget *window);
QWaylandShmWindowSurface(QWindow *window);
~QWaylandShmWindowSurface();
QPaintDevice *paintDevice();
void flush(QWidget *widget, const QRegion &region, const QPoint &offset);
void flush(QWindow *window, const QRegion &region, const QPoint &offset);
void resize(const QSize &size);
void beginPaint(const QRegion &);

View File

@ -47,8 +47,8 @@
#include <QtCore/QDebug>
QWaylandShmWindow::QWaylandShmWindow(QWidget *widget)
: QWaylandWindow(widget)
QWaylandShmWindow::QWaylandShmWindow(QWindow *window)
: QWaylandWindow(window)
{
newSurfaceCreated();
}

View File

@ -48,7 +48,7 @@
class QWaylandShmWindow : public QWaylandWindow
{
public:
QWaylandShmWindow(QWidget *widget);
QWaylandShmWindow(QWindow *window);
~QWaylandShmWindow();
WindowType windowType() const;

View File

@ -46,14 +46,14 @@
#include "qwaylandinputdevice.h"
#include "qwaylandscreen.h"
#include <QtGui/QWidget>
#include <QtGui/QWindow>
#include <QtGui/QWindowSystemInterface>
#include <QDebug>
QWaylandWindow::QWaylandWindow(QWidget *window)
QWaylandWindow::QWaylandWindow(QWindow *window)
: QPlatformWindow(window)
, mDisplay(QWaylandScreen::waylandScreenFromWidget(window)->display())
, mDisplay(QWaylandScreen::waylandScreenFromWindow(window)->display())
, mBuffer(0)
, mWaitingForFrameSync(false)
{
@ -109,7 +109,7 @@ void QWaylandWindow::configure(uint32_t time, uint32_t edges,
setGeometry(geometry);
QWindowSystemInterface::handleGeometryChange(widget(), geometry);
QWindowSystemInterface::handleGeometryChange(window(), geometry);
}
void QWaylandWindow::attach(QWaylandBuffer *buffer)

View File

@ -59,7 +59,7 @@ public:
Egl
};
QWaylandWindow(QWidget *window);
QWaylandWindow(QWindow *window);
~QWaylandWindow();
virtual WindowType windowType() const = 0;