From 74eb0d861b292bdf586816902814b01515eca500 Mon Sep 17 00:00:00 2001 From: Zhiyi Zhang Date: Tue, 1 Nov 2022 17:22:22 +0800 Subject: [PATCH] x11window: Send ConfigureNotify events when moving windows This removes the optimization that sends only one ConfigureNotify event after moving is completed. However, other windows may depend on ConfigureNotify events to adjust their position in a timely manner. For example, the shadow window surrounding the main login window of WeChat on Wine. BUG: 449302 --- src/x11window.cpp | 18 ++---------------- src/x11window.h | 1 - 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/src/x11window.cpp b/src/x11window.cpp index e00363533b..1ae1e7912f 100644 --- a/src/x11window.cpp +++ b/src/x11window.cpp @@ -198,7 +198,6 @@ X11Window::X11Window() , sm_stacking_order(-1) , activitiesDefined(false) , sessionActivityOverride(false) - , needsXWindowMove(false) , m_decoInputExtent() , m_focusOutTimer(nullptr) { @@ -4245,16 +4244,8 @@ void X11Window::updateServerGeometry() } updateShape(); } else { - if (isInteractiveMoveResize()) { - if (Compositor::compositing()) { // Defer the X update until we leave this mode - needsXWindowMove = true; - } else { - m_frame.move(m_bufferGeometry.topLeft()); // sendSyntheticConfigureNotify() on finish shall be sufficient - } - } else { - m_frame.move(m_bufferGeometry.topLeft()); - sendSyntheticConfigureNotify(); - } + m_frame.move(m_bufferGeometry.topLeft()); + sendSyntheticConfigureNotify(); // Unconditionally move the input window: it won't affect rendering m_decoInputExtent.move(pos().toPoint() + inputPos()); } @@ -4673,11 +4664,6 @@ bool X11Window::doStartInteractiveMoveResize() void X11Window::leaveInteractiveMoveResize() { - if (needsXWindowMove) { - // Do the deferred move - m_frame.move(m_bufferGeometry.topLeft().toPoint()); - needsXWindowMove = false; - } if (!isInteractiveResize()) { sendSyntheticConfigureNotify(); // tell the client about it's new final position } diff --git a/src/x11window.h b/src/x11window.h index 59e1f16a1f..5bc7ac100b 100644 --- a/src/x11window.h +++ b/src/x11window.h @@ -524,7 +524,6 @@ private: bool activitiesDefined; // whether the x property was actually set bool sessionActivityOverride; - bool needsXWindowMove; Xcb::Window m_decoInputExtent; QPointF input_offset;