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:
parent
1f13ef7c35
commit
3ac4896a57
2 changed files with 11 additions and 6 deletions
15
client.cpp
15
client.cpp
|
@ -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);
|
||||
|
|
2
client.h
2
client.h
|
@ -175,6 +175,8 @@ protected:
|
|||
void showEvent( QShowEvent* );
|
||||
void hideEvent( QHideEvent* );
|
||||
bool x11Event( XEvent * ); // X11 event
|
||||
|
||||
virtual void activateLayout();
|
||||
|
||||
bool eventFilter( QObject *, QEvent * );
|
||||
|
||||
|
|
Loading…
Reference in a new issue