workaround for broken xemacs ediff windows...
svn path=/trunk/kdebase/kwin/; revision=60312
This commit is contained in:
parent
21dbeccdad
commit
22852f6c47
1 changed files with 12 additions and 6 deletions
14
client.cpp
14
client.cpp
|
@ -491,8 +491,9 @@ bool Client::manage( bool isMapped, bool doNotShow )
|
|||
if ( geom == QApplication::desktop()->geometry() )
|
||||
may_move = FALSE; // don't let fullscreen windows be moved around
|
||||
} else {
|
||||
QRect area = workspace()->clientArea();
|
||||
if ( (xSizeHint.flags & PPosition) || (xSizeHint.flags & USPosition) ) {
|
||||
QRect area = workspace()->clientArea();
|
||||
placementDone = TRUE;
|
||||
if ( !area.contains( geom.topLeft() ) ) {
|
||||
int tx = geom.x();
|
||||
int ty = geom.y();
|
||||
|
@ -500,9 +501,11 @@ bool Client::manage( bool isMapped, bool doNotShow )
|
|||
tx = area.x();
|
||||
if ( ty >= 0 && ty < area.y() )
|
||||
ty = area.y();
|
||||
geom.moveTopLeft( QPoint( tx, ty ) );
|
||||
if ( tx > area.right() || ty > area.right() )
|
||||
placementDone = FALSE; // weird, do not trust.
|
||||
else
|
||||
geom.moveTopLeft( QPoint( tx, ty ) );
|
||||
}
|
||||
placementDone = TRUE;
|
||||
}
|
||||
if ( (xSizeHint.flags & USSize) || (xSizeHint.flags & PSize) ) {
|
||||
// keep in mind that we now actually have a size :-)
|
||||
|
@ -874,7 +877,10 @@ bool Client::configureRequest( XConfigureRequestEvent& e )
|
|||
nw = e.width;
|
||||
if ( e.value_mask & CWHeight )
|
||||
nh = e.height;
|
||||
resize( sizeForWindowSize( QSize( nw, nh ) ) );
|
||||
QSize ns = sizeForWindowSize( QSize( nw, nh ) );
|
||||
if ( ns == size() )
|
||||
return; // broken xemacs stuff (ediff)
|
||||
resize( ns );
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue