From: Gunnar Sletta Date: Fri, 16 Mar 2012 08:45:32 +0000 (+0100) Subject: Send expose events and resize events according to spec X-Git-Tag: TIZEN~106 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ebcf3e92fcb0dcf2a3c1a7e34a7e001791c52b43;p=profile%2Fivi%2Fqtwayland.git Send expose events and resize events according to spec Change-Id: Ia2452cd00e11c42d8ee7e8a1f8c39d82de3f4f37 Reviewed-by: Samuel Rødal --- diff --git a/src/plugins/platforms/wayland/qwaylandwindow.cpp b/src/plugins/platforms/wayland/qwaylandwindow.cpp index 2fb65aa..07a9c46 100644 --- a/src/plugins/platforms/wayland/qwaylandwindow.cpp +++ b/src/plugins/platforms/wayland/qwaylandwindow.cpp @@ -70,6 +70,7 @@ QWaylandWindow::QWaylandWindow(QWindow *window) , mBuffer(0) , mWaitingForFrameSync(false) , mFrameCallback(0) + , mSentInitialResize(false) { static WId id = 1; mWindowId = id++; @@ -121,11 +122,16 @@ void QWaylandWindow::setVisible(bool visible) { if (visible) { + if (!mSentInitialResize) { + QWindowSystemInterface::handleSynchronousGeometryChange(window(), geometry()); + mSentInitialResize = true; + } + QWindowSystemInterface::handleSynchronousExposeEvent(window(), QRect(QPoint(), geometry().size())); if (mBuffer) { wl_surface_attach(mSurface, mBuffer->buffer(),0,0); - QWindowSystemInterface::handleSynchronousExposeEvent(window(), QRect(QPoint(), geometry().size())); } } else { + QWindowSystemInterface::handleSynchronousExposeEvent(window(), QRect(QPoint(), geometry().size())); wl_surface_attach(mSurface, 0,0,0); } } diff --git a/src/plugins/platforms/wayland/qwaylandwindow.h b/src/plugins/platforms/wayland/qwaylandwindow.h index 1f31097..8fcfd8f 100644 --- a/src/plugins/platforms/wayland/qwaylandwindow.h +++ b/src/plugins/platforms/wayland/qwaylandwindow.h @@ -106,6 +106,8 @@ protected: struct wl_callback *mFrameCallback; QWaitCondition mFrameSyncWait; + bool mSentInitialResize; + private: static const wl_callback_listener callbackListener; static void frameCallback(void *data, struct wl_callback *wl_callback, uint32_t time);