summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wayland/qwaylandwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/wayland/qwaylandwindow.cpp')
-rw-r--r--src/plugins/platforms/wayland/qwaylandwindow.cpp37
1 files changed, 9 insertions, 28 deletions
diff --git a/src/plugins/platforms/wayland/qwaylandwindow.cpp b/src/plugins/platforms/wayland/qwaylandwindow.cpp
index a28bdfe..a912a83 100644
--- a/src/plugins/platforms/wayland/qwaylandwindow.cpp
+++ b/src/plugins/platforms/wayland/qwaylandwindow.cpp
@@ -43,10 +43,6 @@
#include "qwaylanddisplay.h"
#include "qwaylandscreen.h"
-#include "qwaylandglcontext.h"
-#include "qwaylandbuffer.h"
-
-#include "qwaylanddrmsurface.h"
#include <QtGui/QWidget>
#include <QtGui/QWindowSystemInterface>
@@ -56,8 +52,6 @@
QWaylandWindow::QWaylandWindow(QWidget *window)
: QPlatformWindow(window)
, mDisplay(QWaylandScreen::waylandScreenFromWidget(window)->display())
- , mGLContext(0)
- , mBuffer(0)
{
static WId id = 1;
mWindowId = id++;
@@ -67,8 +61,6 @@ QWaylandWindow::QWaylandWindow(QWidget *window)
QWaylandWindow::~QWaylandWindow()
{
- if (mGLContext)
- delete mGLContext;
}
WId QWaylandWindow::winId() const
@@ -78,13 +70,17 @@ WId QWaylandWindow::winId() const
void QWaylandWindow::setParent(const QPlatformWindow *parent)
{
- QWaylandWindow *wParent = (QWaylandWindow *)parent;
-
- mParentWindow = wParent;
+ Q_UNUSED(parent);
+ qWarning("Trying to add a raster window as a sub-window");
}
void QWaylandWindow::setVisible(bool visible)
{
+ if (!mSurface) {
+ mSurface = mDisplay->createSurface();
+ newSurfaceCreated();
+ }
+
if (visible) {
wl_surface_set_user_data(mSurface, this);
wl_surface_map_toplevel(mSurface);
@@ -94,13 +90,6 @@ void QWaylandWindow::setVisible(bool visible)
}
}
-void QWaylandWindow::attach(QWaylandBuffer *buffer)
-{
- if (mSurface) {
- wl_surface_attach(mSurface, buffer->buffer(),0,0);
- }
-}
-
void QWaylandWindow::configure(uint32_t time, uint32_t edges,
int32_t x, int32_t y,
int32_t width, int32_t height)
@@ -109,15 +98,7 @@ void QWaylandWindow::configure(uint32_t time, uint32_t edges,
Q_UNUSED(edges);
QRect geometry = QRect(x, y, width, height);
- QWindowSystemInterface::handleGeometryChange(widget(), geometry);
-}
+ setGeometry(geometry);
-QPlatformGLContext *QWaylandWindow::glContext() const
-{
- if (!mGLContext) {
- QWaylandWindow *that = const_cast<QWaylandWindow *>(this);
- that->mGLContext = new QWaylandGLContext(mDisplay, widget()->platformWindowFormat());
- }
-
- return mGLContext;
+ QWindowSystemInterface::handleGeometryChange(widget(), geometry);
}