summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@qt.io>2019-04-16 12:09:37 +0200
committerPaul Olav Tvete <paul.tvete@qt.io>2019-08-13 11:54:41 +0200
commit3d5cec736ce17c6b40c52bb8966f8fc40b742664 (patch)
tree572e187ed119b4fb2e8b59e423c86f71a7abb1f0 /src
parent25a46893782979c74f57ab725b1ce55fbfc4fa2f (diff)
Fix expose event compression
For shells that do not send configure events when exposed: If setGeometry() was called before the window was initialized, Qt would not mark the window as mapped, and the window would never become visible. Change-Id: Ic933cbbff20702424129c11264215181330cc7d1 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/client/qwaylandwindow.cpp4
-rw-r--r--src/client/qwaylandwindow_p.h1
2 files changed, 4 insertions, 1 deletions
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index 5ea0dce1e..76d7715a8 100644
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp
@@ -353,7 +353,7 @@ void QWaylandWindow::setGeometry(const QRect &rect)
mSentInitialResize = true;
}
QRect exposeGeometry(QPoint(), geometry().size());
- if (exposeGeometry != mLastExposeGeometry)
+ if (isExposed() && !mInResizeFromApplyConfigure && exposeGeometry != mLastExposeGeometry)
sendExposeEvent(exposeGeometry);
}
@@ -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 e8c9d5684..23432e398 100644
--- a/src/client/qwaylandwindow_p.h
+++ b/src/client/qwaylandwindow_p.h
@@ -263,6 +263,7 @@ private:
void handleMouseEventWithDecoration(QWaylandInputDevice *inputDevice, const QWaylandPointerEvent &e);
void handleScreenChanged();
+ bool mInResizeFromApplyConfigure = false;
QRect mLastExposeGeometry;
static const wl_callback_listener callbackListener;