Update the wayland plugin

to sha1 bfea3d6befdb688d5354e6f15a9400ea637febf9
This commit is contained in:
Jørgen Lind 2011-06-22 10:00:28 +02:00
parent 2f476d8465
commit bbcc62efaa
4 changed files with 40 additions and 12 deletions

View File

@ -234,17 +234,36 @@ int QWaylandDisplay::sourceUpdate(uint32_t mask, void *data)
}
void QWaylandDisplay::outputHandleGeometry(void *data,
struct wl_output *output,
wl_output *output,
int32_t x, int32_t y,
int32_t width, int32_t height)
int32_t physicalWidth,
int32_t physicalHeight,
int subpixel,
const char *make, const char *model)
{
QWaylandDisplay *waylandDisplay = static_cast<QWaylandDisplay *>(data);
QRect outputRect = QRect(x, y, width, height);
QRect outputRect = QRect(x, y, physicalWidth, physicalHeight);
waylandDisplay->createNewScreen(output,outputRect);
}
void QWaylandDisplay::mode(void *data,
struct wl_output *wl_output,
uint32_t flags,
int width,
int height,
int refresh)
{
Q_UNUSED(data);
Q_UNUSED(wl_output);
Q_UNUSED(flags);
Q_UNUSED(width);
Q_UNUSED(height);
Q_UNUSED(refresh);
}
const struct wl_output_listener QWaylandDisplay::outputListener = {
QWaylandDisplay::outputHandleGeometry
QWaylandDisplay::outputHandleGeometry,
QWaylandDisplay::mode
};
const struct wl_compositor_listener QWaylandDisplay::compositorListener = {

View File

@ -131,7 +131,16 @@ private:
static void outputHandleGeometry(void *data,
struct wl_output *output,
int32_t x, int32_t y,
int32_t width, int32_t height);
int32_t width, int32_t height,
int subpixel,
const char *make,
const char *model);
static void mode(void *data,
struct wl_output *wl_output,
uint32_t flags,
int width,
int height,
int refresh);
static void handleVisual(void *data,
struct wl_compositor *compositor,

View File

@ -59,6 +59,7 @@
QWaylandWindow::QWaylandWindow(QWindow *window)
: QPlatformWindow(window)
, mSurface(0)
, mDisplay(QWaylandScreen::waylandScreenFromWindow(window)->display())
, mBuffer(0)
, mWaitingForFrameSync(false)
@ -70,8 +71,6 @@ QWaylandWindow::QWaylandWindow(QWindow *window)
mDisplay->windowManagerIntegration()->mapClientToProcess(qApp->applicationPid());
mDisplay->windowManagerIntegration()->authenticateWithToken();
#endif
mSurface = mDisplay->createSurface(this);
}
QWaylandWindow::~QWaylandWindow()
@ -102,10 +101,7 @@ void QWaylandWindow::setVisible(bool visible)
newSurfaceCreated();
}
if (visible) {
wl_surface_map_toplevel(mSurface);
QWindowSystemInterface::handleExposeEvent(window(), QRect(QPoint(), geometry().size()));
} else {
if (!visible) {
wl_surface_destroy(mSurface);
mSurface = NULL;
}
@ -129,6 +125,7 @@ void QWaylandWindow::attach(QWaylandBuffer *buffer)
mBuffer = buffer;
if (mSurface) {
wl_surface_attach(mSurface, buffer->buffer(),0,0);
QWindowSystemInterface::handleExposeEvent(window(), QRect(QPoint(), geometry().size()));
}
}
@ -145,6 +142,8 @@ void QWaylandWindow::damage(const QRegion &region)
wl_buffer_damage(mBuffer->buffer(), rect.x(), rect.y(), rect.width(), rect.height());
wl_surface_damage(mSurface,
rect.x(), rect.y(), rect.width(), rect.height());
wl_buffer_damage(mBuffer->buffer(),
rect.x(), rect.y(), rect.width(), rect.height());
}
}
@ -152,6 +151,7 @@ void QWaylandWindow::newSurfaceCreated()
{
if (mBuffer) {
wl_surface_attach(mSurface,mBuffer->buffer(),0,0);
QWindowSystemInterface::handleExposeEvent(window(), QRect(QPoint(), geometry().size()));
}
}

View File

@ -1,3 +1,3 @@
This version of the Qt Wayland plugin is checked against the following sha1
from the Wayland repository:
eff7fc0d99be2e51eaa351785030c8d374ac71de
bfea3d6befdb688d5354e6f15a9400ea637febf9