Make sure also dialogs are not placed under toplevel menubar or
Kicker at the top edge. svn path=/trunk/kdebase/kwin/; revision=177159
This commit is contained in:
parent
7a9e7dbb24
commit
20f980dff7
1 changed files with 15 additions and 12 deletions
23
client.cpp
23
client.cpp
|
@ -698,7 +698,19 @@ bool Client::manage( bool isMapped, bool doNotShow, bool isInitial )
|
|||
if ( ( (xSizeHint.flags & PPosition) && !ignorePPosition ) ||
|
||||
(xSizeHint.flags & USPosition) ) {
|
||||
placementDone = TRUE;
|
||||
if ( windowType() == NET::Normal && !area.contains( geom.topLeft() ) && may_move ) {
|
||||
}
|
||||
if ( (xSizeHint.flags & USSize) || (xSizeHint.flags & PSize) ) {
|
||||
// keep in mind that we now actually have a size :-)
|
||||
}
|
||||
if (xSizeHint.flags & PMaxSize)
|
||||
geom.setSize( geom.size().boundedTo( QSize(xSizeHint.max_width, xSizeHint.max_height ) ) );
|
||||
if (xSizeHint.flags & PMinSize)
|
||||
geom.setSize( geom.size().expandedTo( QSize(xSizeHint.min_width, xSizeHint.min_height ) ) );
|
||||
}
|
||||
|
||||
if ( ( windowType() == NET::Normal || windowType() == NET::Dialog || windowType() == NET::Unknown
|
||||
|| windowType() == NET::Menu )
|
||||
&& !area.contains( geom.topLeft() ) && may_move ) {
|
||||
int tx = geom.x();
|
||||
int ty = geom.y();
|
||||
if ( tx >= 0 && tx < area.x() )
|
||||
|
@ -710,15 +722,6 @@ bool Client::manage( bool isMapped, bool doNotShow, bool isInitial )
|
|||
else
|
||||
geom.moveTopLeft( QPoint( tx, ty ) );
|
||||
}
|
||||
}
|
||||
if ( (xSizeHint.flags & USSize) || (xSizeHint.flags & PSize) ) {
|
||||
// keep in mind that we now actually have a size :-)
|
||||
}
|
||||
if (xSizeHint.flags & PMaxSize)
|
||||
geom.setSize( geom.size().boundedTo( QSize(xSizeHint.max_width, xSizeHint.max_height ) ) );
|
||||
if (xSizeHint.flags & PMinSize)
|
||||
geom.setSize( geom.size().expandedTo( QSize(xSizeHint.min_width, xSizeHint.min_height ) ) );
|
||||
}
|
||||
|
||||
windowWrapper()->resize( geom.size() );
|
||||
// the clever activate() trick is necessary
|
||||
|
|
Loading…
Reference in a new issue