help ugly motif apps or nasty java programs to position windows halfway decent
svn path=/trunk/kdebase/kwin/; revision=56648
This commit is contained in:
parent
5fb81f837b
commit
d653417387
1 changed files with 16 additions and 1 deletions
15
client.cpp
15
client.cpp
|
@ -503,6 +503,20 @@ void Client::manage( bool isMapped )
|
|||
geom.setRect( xSizeHint.x, geom.y(), geom.width(), geom.height() );
|
||||
if ( xSizeHint.y != 0 && geom.y() == 0 )
|
||||
geom.setRect( geom.x(), xSizeHint.y, geom.width(), geom.height() );
|
||||
|
||||
if ( (xSizeHint.flags & USPosition) == 0 ) {
|
||||
QRect area = workspace()->clientArea();
|
||||
if ( !area.contains( geom.topLeft() ) ) {
|
||||
int tx = geom.x();
|
||||
int ty = geom.y();
|
||||
if ( tx >= 0 && tx < area.x() )
|
||||
tx = area.x();
|
||||
if ( ty >= 0 && ty < area.y() )
|
||||
ty = area.y();
|
||||
geom.moveTopLeft( QPoint( tx, ty ) );
|
||||
}
|
||||
}
|
||||
|
||||
placementDone = TRUE;
|
||||
}
|
||||
if ( (xSizeHint.flags & USSize) || (xSizeHint.flags & PSize) ) {
|
||||
|
@ -520,6 +534,7 @@ void Client::manage( bool isMapped )
|
|||
resize ( sizeForWindowSize( geom.size() ) );
|
||||
activateLayout();
|
||||
|
||||
|
||||
move( geom.x(), geom.y() );
|
||||
gravitate( FALSE );
|
||||
|
||||
|
|
Loading…
Reference in a new issue