revert r1078325 and moves the handling of Maximize state changes when
un-grouping windows to clientgroup.cpp. Ensures that Client::maximize( MaximizeRestore ) is called when appropriate to avoid decoration artifacts. BUG: 223060 svn path=/trunk/KDE/kdebase/workspace/; revision=1078877
This commit is contained in:
parent
cc8cc5d098
commit
4874785fb4
2 changed files with 13 additions and 3 deletions
|
@ -165,8 +165,19 @@ void ClientGroup::remove( Client* c, const QRect& newGeom, bool toNullGroup )
|
|||
|
||||
c->setClientGroup( toNullGroup ? NULL : new ClientGroup( c ));
|
||||
if( newGeom.isValid() )
|
||||
{
|
||||
// HACK: if the group was maximized, one needs to make some checks on the future client maximize mode
|
||||
// because the transition from maximized to MaximizeRestore is not handled properly in setGeometry when
|
||||
// the new geometry size is unchanged.
|
||||
// since newGeom has the same size as the old client geometry, one just needs to check the topLeft position of newGeom
|
||||
// and compare that to the group maximize mode.
|
||||
// when the new mode is predicted to be MaximizeRestore, one must set it manually, in order to avoid decoration artifacts
|
||||
Client::MaximizeMode groupMaxMode( newVisible->maximizeMode() );
|
||||
if( ( ( groupMaxMode & Client::MaximizeHorizontal ) && newGeom.left() != newVisible->geometry().left() ) ||
|
||||
( ( groupMaxMode & Client::MaximizeVertical ) && newGeom.top() != newVisible->geometry().top() ) )
|
||||
c->maximize( Client::MaximizeRestore );
|
||||
c->setGeometry( newGeom );
|
||||
|
||||
}
|
||||
newVisible->triggerDecorationRepaint();
|
||||
}
|
||||
|
||||
|
|
|
@ -2018,7 +2018,6 @@ void Client::setGeometry( int x, int y, int w, int h, ForceGeometry_t force )
|
|||
|
||||
// keep track of old maximize mode
|
||||
// to detect changes
|
||||
MaximizeMode old_mode( max_mode );
|
||||
checkMaximizeGeometry();
|
||||
workspace()->checkActiveScreen( this );
|
||||
workspace()->updateStackingOrder();
|
||||
|
@ -2028,7 +2027,7 @@ void Client::setGeometry( int x, int y, int w, int h, ForceGeometry_t force )
|
|||
// - size is changed
|
||||
// - maximize mode is changed to MaximizeRestore, when size unchanged
|
||||
// which can happen when untabbing maximized windows
|
||||
if( resized || ( old_mode != max_mode && max_mode == MaximizeRestore ) )
|
||||
if( resized )
|
||||
{
|
||||
discardWindowPixmap();
|
||||
if( scene != NULL )
|
||||
|
|
Loading…
Reference in a new issue