From b525af029ec589d6d4bd5c155b107887c2fed473 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Tue, 3 Feb 2004 15:18:15 +0000 Subject: [PATCH] Avoid sending synthetic configure notify events with user moving/resizing when a real one will be sent. svn path=/trunk/kdebase/kwin/; revision=284785 --- events.cpp | 5 +++-- geometry.cpp | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/events.cpp b/events.cpp index 7c320a2c63..f18ab3de4d 100644 --- a/events.cpp +++ b/events.cpp @@ -778,8 +778,9 @@ void Client::configureRequestEvent( XConfigureRequestEvent* e ) // TODO sending a synthetic configure notify always is fine, even in cases where // the ICCCM doesn't require this - it can be though of as 'the WM decided to move - // the window later'. Perhaps those unnecessary ones could be saved though. - // See also Client::setGeometry()/plainResize()/move(). + // the window later'. The client should not cause that many configure request, + // so this should not have any significant impact. With user moving/resizing + // the it should be optimized though (see also Client::setGeometry()/plainResize()/move()). sendSyntheticConfigureNotify(); // SELI TODO accept configure requests for isDesktop windows (because kdesktop diff --git a/geometry.cpp b/geometry.cpp index dacce78376..6df092c3e2 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -1149,12 +1149,13 @@ void Client::setGeometry( int x, int y, int w, int h, ForceGeometry_t force ) cs.width(), cs.height()); // FRAME tady poradi tak, at neni flicker XMoveResizeWindow( qt_xdisplay(), window(), 0, 0, cs.width(), cs.height()); + // no need for real configure notify, XMoveResizeWindow() already causes real one + // sendSyntheticConfigureNotify(); } if( shape()) updateShape(); // SELI TODO won't this be too expensive? updateWorkareaDiffs(); - sendSyntheticConfigureNotify(); // TODO optimize this? } } @@ -1187,11 +1188,12 @@ void Client::plainResize( int w, int h, ForceGeometry_t force ) XMoveResizeWindow( qt_xdisplay(), wrapperId(), clientPos().x(), clientPos().y(), cs.width(), cs.height()); XMoveResizeWindow( qt_xdisplay(), window(), 0, 0, cs.width(), cs.height()); + // no need for real configure notify, XMoveResizeWindow() already causes real one + // sendSyntheticConfigureNotify(); } if( shape()) updateShape(); updateWorkareaDiffs(); - sendSyntheticConfigureNotify(); } }