Turned layout()->activate() into a new virtual function, 'activateLayout()',

which is called at the same places.

Mosfet: This is necessary because we are converting to not use QLayout
in clients. Without this, you can't get the right size for your windows.
Just implement it in your client and do your layout in it (surprise, eh ?)

svn path=/trunk/kdebase/kwin/; revision=49143
This commit is contained in:
Rik Hemsley 2000-05-11 03:31:54 +00:00
parent 1f13ef7c35
commit 3ac4896a57
2 changed files with 11 additions and 6 deletions

View file

@ -415,11 +415,9 @@ void Client::manage( bool isMapped )
windowWrapper()->resize( geom.size() );
// the clever activate() trick is necessary
if (layout())
layout()->activate();
activateLayout();
resize ( sizeForWindowSize( geom.size() ) );
if (layout())
layout()->activate();
activateLayout();
move( geom.x(), geom.y() );
gravitate( FALSE );
@ -1503,8 +1501,7 @@ void Client::setShade( bool s )
clearWFlags( WNorthWestGravity );
resize ( s );
windowWrapper()->show();
if (layout())
layout()->activate();
activateLayout();
repaint();
if ( isActive() )
workspace()->requestFocus( this );
@ -1905,6 +1902,12 @@ QCString Client::sessionId()
return result;
}
void Client::activateLayout()
{
if (layout())
layout()->activate();
}
void Client::updateAvoidPolicy()
{
// qDebug("kwin: Client::updateAvoidPolicy() - win id == %x", (int)win);

View file

@ -175,6 +175,8 @@ protected:
void showEvent( QShowEvent* );
void hideEvent( QHideEvent* );
bool x11Event( XEvent * ); // X11 event
virtual void activateLayout();
bool eventFilter( QObject *, QEvent * );