summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Lübking <thomas.luebking@gmail.com>2012-12-29 21:27:31 (GMT)
committerThomas Lübking <thomas.luebking@gmail.com>2013-01-02 18:05:11 (GMT)
commitbc3ccaeda1a691730a6af95451598a81d42c74d7 (patch)
tree7867447cdb5c5024bf9d6f290a864e02a8f0b102
parentd388e3ff1cbe2d940974eab075d11015757349c8 (diff)
use synthetic configure notifies when needed
the patch omit them while the user just moves around a window and adds one that got lost with the deferred XMoveResize patch, causing BUG: 312346 FIXED-IN: 4.10 REVIEW: 108013
-rw-r--r--kwin/geometry.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/kwin/geometry.cpp b/kwin/geometry.cpp
index c3deb34..0047165 100644
--- a/kwin/geometry.cpp
+++ b/kwin/geometry.cpp
@@ -1865,14 +1865,20 @@ void Client::setGeometry(int x, int y, int w, int h, ForceGeometry_t force)
if (!isResize() || syncRequest.counter == None)
#endif
XMoveResizeWindow(display(), window(), 0, 0, cs.width(), cs.height());
+ // SELI - won't this be too expensive?
+ // THOMAS - yes, but gtk+ clients will not resize without ...
+ sendSyntheticConfigureNotify();
}
updateShape();
} else {
- if (moveResizeMode && compositing()) {
- // Defer the X update until we leave this mode
- needsXWindowMove = true;
+ if (moveResizeMode) {
+ if (compositing()) // Defer the X update until we leave this mode
+ needsXWindowMove = true;
+ else
+ XMoveWindow(display(), frameId(), x, y); // sendSyntheticConfigureNotify() on finish shall be sufficient
} else {
XMoveWindow(display(), frameId(), x, y);
+ sendSyntheticConfigureNotify();
}
// Unconditionally move the input window: it won't affect rendering
@@ -1881,8 +1887,6 @@ void Client::setGeometry(int x, int y, int w, int h, ForceGeometry_t force)
XMoveWindow(display(), inputId(), pos.x(), pos.y());
}
}
- // SELI TODO won't this be too expensive?
- sendSyntheticConfigureNotify();
updateWindowRules(Rules::Position|Rules::Size);
// keep track of old maximize mode
@@ -2646,6 +2650,8 @@ void Client::leaveMoveResize()
XMoveWindow(display(), frameId(), geom.x(), geom.y());
needsXWindowMove = false;
}
+ if (!isResize())
+ sendSyntheticConfigureNotify(); // tell the client about it's new final position
if (geometryTip) {
geometryTip->hide();
delete geometryTip;
@@ -3026,7 +3032,7 @@ void Client::handleMoveResize(int x, int y, int x_root, int y_root)
sendSyncRequest();
} else { // for clients not supporting the XSYNC protocol, we
syncRequest.isPending = true; // limit the resizes to 30Hz to take pointless load from X11
- syncRequest.timeout->start(33); // and the client, the mouse is still moved a full speed
+ syncRequest.timeout->start(33); // and the client, the mouse is still moved at full speed
} // and no human can control faster resizes anyway
XMoveResizeWindow(display(), window(), 0, 0, moveResizeGeom.width() - (border_left + border_right), moveResizeGeom.height() - (border_top + border_bottom));
} else