@ -281,6 +281,7 @@ void WindowThumbnailItem::setWId(const QUuid &wId)
setClient ( workspace ( ) - > findAbstractClient ( wId ) ) ;
} else if ( m_client ) {
m_client = nullptr ;
updateImplicitSize ( ) ;
Q_EMIT clientChanged ( ) ;
}
Q_EMIT wIdChanged ( ) ;
@ -301,6 +302,8 @@ void WindowThumbnailItem::setClient(AbstractClient *client)
this , & WindowThumbnailItem : : invalidateOffscreenTexture ) ;
disconnect ( m_client , & AbstractClient : : damaged ,
this , & WindowThumbnailItem : : invalidateOffscreenTexture ) ;
disconnect ( m_client , & AbstractClient : : frameGeometryChanged ,
this , & WindowThumbnailItem : : updateImplicitSize ) ;
}
m_client = client ;
if ( m_client ) {
@ -308,14 +311,26 @@ void WindowThumbnailItem::setClient(AbstractClient *client)
this , & WindowThumbnailItem : : invalidateOffscreenTexture ) ;
connect ( m_client , & AbstractClient : : damaged ,
this , & WindowThumbnailItem : : invalidateOffscreenTexture ) ;
connect ( m_client , & AbstractClient : : frameGeometryChanged ,
this , & WindowThumbnailItem : : updateImplicitSize ) ;
setWId ( m_client - > internalId ( ) ) ;
} else {
setWId ( QUuid ( ) ) ;
}
invalidateOffscreenTexture ( ) ;
updateImplicitSize ( ) ;
Q_EMIT clientChanged ( ) ;
}
void WindowThumbnailItem : : updateImplicitSize ( )
{
QSize frameSize ;
if ( m_client ) {
frameSize = m_client - > frameGeometry ( ) . size ( ) ;
}
setImplicitSize ( frameSize . width ( ) , frameSize . height ( ) ) ;
}
QImage WindowThumbnailItem : : fallbackImage ( ) const
{
if ( m_client ) {