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
This commit is contained in:
Zhiyi Zhang 2022-11-01 17:22:22 +08:00
parent 13a793d9bb
commit 74eb0d861b
2 changed files with 2 additions and 17 deletions

View file

@ -198,7 +198,6 @@ X11Window::X11Window()
, sm_stacking_order(-1) , sm_stacking_order(-1)
, activitiesDefined(false) , activitiesDefined(false)
, sessionActivityOverride(false) , sessionActivityOverride(false)
, needsXWindowMove(false)
, m_decoInputExtent() , m_decoInputExtent()
, m_focusOutTimer(nullptr) , m_focusOutTimer(nullptr)
{ {
@ -4245,16 +4244,8 @@ void X11Window::updateServerGeometry()
} }
updateShape(); updateShape();
} else { } else {
if (isInteractiveMoveResize()) { m_frame.move(m_bufferGeometry.topLeft());
if (Compositor::compositing()) { // Defer the X update until we leave this mode sendSyntheticConfigureNotify();
needsXWindowMove = true;
} else {
m_frame.move(m_bufferGeometry.topLeft()); // sendSyntheticConfigureNotify() on finish shall be sufficient
}
} else {
m_frame.move(m_bufferGeometry.topLeft());
sendSyntheticConfigureNotify();
}
// Unconditionally move the input window: it won't affect rendering // Unconditionally move the input window: it won't affect rendering
m_decoInputExtent.move(pos().toPoint() + inputPos()); m_decoInputExtent.move(pos().toPoint() + inputPos());
} }
@ -4673,11 +4664,6 @@ bool X11Window::doStartInteractiveMoveResize()
void X11Window::leaveInteractiveMoveResize() void X11Window::leaveInteractiveMoveResize()
{ {
if (needsXWindowMove) {
// Do the deferred move
m_frame.move(m_bufferGeometry.topLeft().toPoint());
needsXWindowMove = false;
}
if (!isInteractiveResize()) { if (!isInteractiveResize()) {
sendSyntheticConfigureNotify(); // tell the client about it's new final position sendSyntheticConfigureNotify(); // tell the client about it's new final position
} }

View file

@ -524,7 +524,6 @@ private:
bool activitiesDefined; // whether the x property was actually set bool activitiesDefined; // whether the x property was actually set
bool sessionActivityOverride; bool sessionActivityOverride;
bool needsXWindowMove;
Xcb::Window m_decoInputExtent; Xcb::Window m_decoInputExtent;
QPointF input_offset; QPointF input_offset;