}
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 = {
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,
QWaylandWindow::QWaylandWindow(QWidget *window)
: QPlatformWindow(window)
+ , mSurface(0)
, mDisplay(QWaylandScreen::waylandScreenFromWidget(window)->display())
, mBuffer(0)
, mWaitingForFrameSync(false)
mDisplay->windowManagerIntegration()->mapClientToProcess(qApp->applicationPid());
mDisplay->windowManagerIntegration()->authenticateWithToken();
#endif
-
- mSurface = mDisplay->createSurface(this);
}
QWaylandWindow::~QWaylandWindow()
newSurfaceCreated();
}
- if (visible) {
- wl_surface_map_toplevel(mSurface);
- } else {
+ if (!visible) {
wl_surface_destroy(mSurface);
mSurface = NULL;
}
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());
}
}
This version of the Qt Wayland plugin is checked against the following sha1
from the Wayland repository:
-eff7fc0d99be2e51eaa351785030c8d374ac71de
+bfea3d6befdb688d5354e6f15a9400ea637febf9