From ba7c5936fe6309ff02fbefc086067bbca9ff72b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Tue, 10 Sep 2013 07:45:17 +0200 Subject: [PATCH] Use Client::m_client instead of Toplevel::window() where useful Allows to use .setGeometry() instead of XMoveResizeWindow. --- client.cpp | 2 +- geometry.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client.cpp b/client.cpp index 6a39121c95..c067a6dac0 100644 --- a/client.cpp +++ b/client.cpp @@ -999,7 +999,7 @@ void Client::setShade(ShadeMode mode) shade_below = NULL; } XMapWindow(display(), wrapperId()); - XMapWindow(display(), window()); + m_client.map(); exportMappingState(NormalState); if (isActive()) workspace()->requestFocus(this); diff --git a/geometry.cpp b/geometry.cpp index 37069ea58c..010632c721 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -1915,7 +1915,7 @@ void Client::setGeometry(int x, int y, int w, int h, ForceGeometry_t force) QSize cs = clientSize(); m_wrapper.setGeometry(QRect(clientPos(), cs)); if (!isResize() || syncRequest.counter == XCB_NONE) - XMoveResizeWindow(display(), window(), 0, 0, cs.width(), cs.height()); + m_client.setGeometry(0, 0, cs.width(), cs.height()); // SELI - won't this be too expensive? // THOMAS - yes, but gtk+ clients will not resize without ... sendSyntheticConfigureNotify(); @@ -2003,7 +2003,7 @@ void Client::plainResize(int w, int h, ForceGeometry_t force) if (!isShade()) { QSize cs = clientSize(); m_wrapper.setGeometry(QRect(clientPos(), cs)); - XMoveResizeWindow(display(), window(), 0, 0, cs.width(), cs.height()); + m_client.setGeometry(0, 0, cs.width(), cs.height()); } updateShape(); @@ -3030,7 +3030,7 @@ void Client::handleMoveResize(int x, int y, int x_root, int y_root) 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 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)); + m_client.setGeometry(0, 0, moveResizeGeom.width() - (border_left + border_right), moveResizeGeom.height() - (border_top + border_bottom)); } else performMoveResize();