Argh ! Check return values of functions like QWidget::layout() !
Took me ages to figure out why riscosstyle crashed :( svn path=/trunk/kdebase/kwin/; revision=49137
This commit is contained in:
parent
69c7133c9d
commit
1f13ef7c35
1 changed files with 8 additions and 4 deletions
12
client.cpp
12
client.cpp
|
@ -383,7 +383,8 @@ Client::~Client()
|
|||
void Client::manage( bool isMapped )
|
||||
{
|
||||
|
||||
layout()->setResizeMode( QLayout::Minimum );
|
||||
if (layout())
|
||||
layout()->setResizeMode( QLayout::Minimum );
|
||||
QRect geom( original_geometry );
|
||||
bool placementDone = FALSE;
|
||||
|
||||
|
@ -414,9 +415,11 @@ void Client::manage( bool isMapped )
|
|||
|
||||
windowWrapper()->resize( geom.size() );
|
||||
// the clever activate() trick is necessary
|
||||
layout()->activate();
|
||||
if (layout())
|
||||
layout()->activate();
|
||||
resize ( sizeForWindowSize( geom.size() ) );
|
||||
layout()->activate();
|
||||
if (layout())
|
||||
layout()->activate();
|
||||
|
||||
move( geom.x(), geom.y() );
|
||||
gravitate( FALSE );
|
||||
|
@ -1500,7 +1503,8 @@ void Client::setShade( bool s )
|
|||
clearWFlags( WNorthWestGravity );
|
||||
resize ( s );
|
||||
windowWrapper()->show();
|
||||
layout()->activate();
|
||||
if (layout())
|
||||
layout()->activate();
|
||||
repaint();
|
||||
if ( isActive() )
|
||||
workspace()->requestFocus( this );
|
||||
|
|
Loading…
Reference in a new issue