Add clients to a NULL group when they are released if they were in a
group before. svn path=/trunk/KDE/kdebase/workspace/; revision=1049887
This commit is contained in:
parent
026d0a9839
commit
fad5724f33
3 changed files with 12 additions and 10 deletions
|
@ -246,7 +246,7 @@ void Client::releaseWindow( bool on_shutdown )
|
|||
destroyDecoration();
|
||||
cleanGrouping();
|
||||
if( clientGroup() )
|
||||
clientGroup()->remove( this );
|
||||
clientGroup()->remove( this, QRect(), true );
|
||||
if( !on_shutdown )
|
||||
{
|
||||
workspace()->removeClient( this, Allowed );
|
||||
|
@ -310,7 +310,7 @@ void Client::destroyClient()
|
|||
destroyDecoration();
|
||||
cleanGrouping();
|
||||
if( clientGroup() )
|
||||
clientGroup()->remove( this );
|
||||
clientGroup()->remove( this, QRect(), true );
|
||||
workspace()->removeClient( this, Allowed );
|
||||
client = None; // invalidate
|
||||
XDestroyWindow( display(), wrapper );
|
||||
|
|
|
@ -97,12 +97,12 @@ void ClientGroup::add( Client* c, int before, bool becomeVisible )
|
|||
clients_[visible_]->triggerDecorationRepaint();
|
||||
}
|
||||
|
||||
void ClientGroup::remove( int index, const QRect& newGeom )
|
||||
void ClientGroup::remove( int index, const QRect& newGeom, bool toNullGroup )
|
||||
{
|
||||
remove( clients_[index], newGeom );
|
||||
remove( clients_[index], newGeom, toNullGroup );
|
||||
}
|
||||
|
||||
void ClientGroup::remove( Client* c, const QRect& newGeom )
|
||||
void ClientGroup::remove( Client* c, const QRect& newGeom, bool toNullGroup )
|
||||
{
|
||||
if( !c )
|
||||
return;
|
||||
|
@ -130,7 +130,7 @@ void ClientGroup::remove( Client* c, const QRect& newGeom )
|
|||
updateItems();
|
||||
updateMinMaxSize();
|
||||
|
||||
c->setClientGroup( new ClientGroup( c ));
|
||||
c->setClientGroup( toNullGroup ? NULL : new ClientGroup( c ));
|
||||
if( newGeom.isValid() )
|
||||
c->setGeometry( newGeom );
|
||||
|
||||
|
|
|
@ -62,14 +62,16 @@ class ClientGroup
|
|||
/**
|
||||
* Remove the client at index \p index from the group. If \p newGeom is set then the client
|
||||
* will move and resize to the specified geometry, otherwise it will stay where the group
|
||||
* is located.
|
||||
* is located. If \p toNullGroup is not true then the client will be added to a new group
|
||||
* of its own.
|
||||
*/
|
||||
void remove( int index, const QRect& newGeom = QRect() );
|
||||
void remove( int index, const QRect& newGeom = QRect(), bool toNullGroup = false );
|
||||
/**
|
||||
* Remove \p c from the group. If \p newGeom is set then the client will move and resize to
|
||||
* the specified geometry, otherwise it will stay where the group is located.
|
||||
* the specified geometry, otherwise it will stay where the group is located. If
|
||||
* \p toNullGroup is not true then the client will be added to a new group of its own.
|
||||
*/
|
||||
void remove( Client* c, const QRect& newGeom = QRect() );
|
||||
void remove( Client* c, const QRect& newGeom = QRect(), bool toNullGroup = false );
|
||||
/**
|
||||
* Remove all clients from this group. Results in all clients except the first being moved
|
||||
to a group of their own.
|
||||
|
|
Loading…
Reference in a new issue