From 21dbeccdad64cb012ef60f59f001b9e81c3b5bf3 Mon Sep 17 00:00:00 2001 From: Matthias Ettrich Date: Wed, 9 Aug 2000 12:06:03 +0000 Subject: [PATCH] some ICCCM clearifications svn path=/trunk/kdebase/kwin/; revision=60306 --- client.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/client.cpp b/client.cpp index dab7268b2b..568ff22038 100644 --- a/client.cpp +++ b/client.cpp @@ -848,13 +848,23 @@ bool Client::configureRequest( XConfigureRequestEvent& e ) } if ( e.value_mask & (CWX | CWY ) ) { - int nx = x() + windowWrapper()->x(); - int ny = y() + windowWrapper()->y(); + int ox = 0; + int oy = 0; + int gravity = NorthWestGravity; + if ( xSizeHint.flags & PWinGravity) + gravity = xSizeHint.win_gravity; + if ( TRUE || gravity == StaticGravity ) { + // the TRUE makes it work with real programs, but it's not ICCCM. + ox = windowWrapper()->x(); + oy = windowWrapper()->y(); + } + int nx = x() + ox; + int ny = y() + oy; if ( e.value_mask & CWX ) nx = e.x; if ( e.value_mask & CWY ) ny = e.y; - move( nx - windowWrapper()->x(), ny - windowWrapper()->y() ); + move( nx - ox, ny - oy ); } if ( e.value_mask & (CWWidth | CWHeight ) ) {