diff options
-rw-r--r-- | examples/wayland/wayland.pro | 4 | ||||
-rw-r--r-- | src/client/qwaylandwindow.cpp | 4 | ||||
-rw-r--r-- | src/client/qwaylandwindow_p.h | 1 | ||||
-rw-r--r-- | tests/auto/auto.pro | 11 |
4 files changed, 12 insertions, 8 deletions
diff --git a/examples/wayland/wayland.pro b/examples/wayland/wayland.pro index 2b7f992e4..f9287481b 100644 --- a/examples/wayland/wayland.pro +++ b/examples/wayland/wayland.pro @@ -1,6 +1,8 @@ -requires(qtHaveModule(waylandcompositor)) TEMPLATE=subdirs +!qtHaveModule(waylandcompositor): \ + return() + qtConfig(opengl) { SUBDIRS += \ qwindow-compositor \ diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp index 8c462c113..ce58003cc 100644 --- a/src/client/qwaylandwindow.cpp +++ b/src/client/qwaylandwindow.cpp @@ -350,7 +350,7 @@ void QWaylandWindow::setGeometry(const QRect &rect) mSentInitialResize = true; } QRect exposeGeometry(QPoint(), geometry().size()); - if (exposeGeometry != mLastExposeGeometry) + if (isExposed() && !mInResizeFromApplyConfigure && exposeGeometry != mLastExposeGeometry) sendExposeEvent(exposeGeometry); if (mShellSurface) @@ -365,7 +365,9 @@ void QWaylandWindow::resizeFromApplyConfigure(const QSize &sizeWithMargins, cons QRect geometry(windowGeometry().topLeft(), QSize(widthWithoutMargins, heightWithoutMargins)); mOffset += offset; + mInResizeFromApplyConfigure = true; setGeometry(geometry); + mInResizeFromApplyConfigure = false; } void QWaylandWindow::sendExposeEvent(const QRect &rect) diff --git a/src/client/qwaylandwindow_p.h b/src/client/qwaylandwindow_p.h index eca883a74..8d8565d77 100644 --- a/src/client/qwaylandwindow_p.h +++ b/src/client/qwaylandwindow_p.h @@ -264,6 +264,7 @@ private: void handleMouseEventWithDecoration(QWaylandInputDevice *inputDevice, const QWaylandPointerEvent &e); void handleScreensChanged(); + bool mInResizeFromApplyConfigure = false; QRect mLastExposeGeometry; static const wl_callback_listener callbackListener; diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro index 4ae3b4f65..d81339e86 100644 --- a/tests/auto/auto.pro +++ b/tests/auto/auto.pro @@ -1,11 +1,10 @@ TEMPLATE=subdirs QT_FOR_CONFIG += waylandclient-private -qtConfig(wayland-client): \ - SUBDIRS += client +!qtHaveModule(waylandcompositor): \ + return() -qtConfig(wayland-client):qtHaveModule(waylandcompositor): \ - SUBDIRS += cmake +SUBDIRS += compositor -qtHaveModule(waylandcompositor): \ - SUBDIRS += compositor +qtConfig(wayland-client): \ + SUBDIRS += client cmake |