qt5-qtwayland/qtwayland-fix-expose-event-compression.patch

36 lines
1.4 KiB
Diff
Raw Normal View History

diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index 5e7e215..e4323e8 100644
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp
@@ -355,7 +355,7 @@ void QWaylandWindow::setGeometry(const QRect &rect)
mSentInitialResize = true;
}
QRect exposeGeometry(QPoint(), geometry().size());
- if (exposeGeometry != mLastExposeGeometry)
+ if (isExposed() && !mInResizeFromApplyConfigure && exposeGeometry != mLastExposeGeometry)
sendExposeEvent(exposeGeometry);
}
@@ -367,7 +367,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 d605b52..c82aa8d 100644
--- a/src/client/qwaylandwindow_p.h
+++ b/src/client/qwaylandwindow_p.h
@@ -269,6 +269,7 @@ private:
void handleMouseEventWithDecoration(QWaylandInputDevice *inputDevice, const QWaylandPointerEvent &e);
void handleScreenChanged();
+ bool mInResizeFromApplyConfigure = false;
QRect mLastExposeGeometry;
static const wl_callback_listener callbackListener;