Add return values to client group decoration functions that can safely
work when the window isn't in a client group at all. BUG: 218086 svn path=/trunk/KDE/kdebase/workspace/; revision=1065963
This commit is contained in:
parent
fc86648f7e
commit
d907939445
1 changed files with 13 additions and 3 deletions
16
bridge.cpp
16
bridge.cpp
|
@ -215,12 +215,20 @@ QRect Bridge::transparentRect() const
|
|||
|
||||
bool Bridge::isClientGroupActive()
|
||||
{
|
||||
return c->clientGroup()->containsActiveClient();
|
||||
if( c->clientGroup() )
|
||||
return c->clientGroup()->containsActiveClient();
|
||||
return isActive();
|
||||
}
|
||||
|
||||
QList< ClientGroupItem > Bridge::clientGroupItems() const
|
||||
{
|
||||
return c->clientGroup()->items();
|
||||
if( c->clientGroup() )
|
||||
return c->clientGroup()->items();
|
||||
QList< ClientGroupItem > items;
|
||||
QIcon icon( c->icon() );
|
||||
icon.addPixmap( c->miniIcon() );
|
||||
items.append( ClientGroupItem( c->caption(), icon ));
|
||||
return items;
|
||||
}
|
||||
|
||||
long Bridge::itemId( int index )
|
||||
|
@ -231,7 +239,9 @@ long Bridge::itemId( int index )
|
|||
|
||||
int Bridge::visibleClientGroupItem()
|
||||
{
|
||||
return c->clientGroup()->indexOfVisibleClient();
|
||||
if( c->clientGroup() )
|
||||
return c->clientGroup()->indexOfVisibleClient();
|
||||
return 0;
|
||||
}
|
||||
|
||||
void Bridge::setVisibleClientGroupItem( int index )
|
||||
|
|
Loading…
Reference in a new issue