react properly on sendClientToDesktop requests from kicker
svn path=/trunk/kdebase/kwin/; revision=54143
This commit is contained in:
parent
6ed208596c
commit
3693e4ba80
3 changed files with 36 additions and 21 deletions
|
@ -49,7 +49,10 @@ public:
|
|||
}
|
||||
|
||||
virtual void changeDesktop(Q_UINT32 desktop) {
|
||||
m_client->setDesktop( desktop );
|
||||
if ( desktop == NETWinInfo::OnAllDesktops )
|
||||
m_client->setSticky( TRUE );
|
||||
else
|
||||
m_client->workspace()->sendClientToDesktop( m_client, desktop );
|
||||
}
|
||||
virtual void changeState(Q_UINT32 state, Q_UINT32 mask ) {
|
||||
// state : kwin.h says: possible values are or'ed combinations of NET::Modal,
|
||||
|
|
|
@ -2014,7 +2014,32 @@ void Workspace::clientPopupAboutToShow()
|
|||
|
||||
|
||||
/*!
|
||||
Sends the activeClient() to desktop \a desk
|
||||
Sends client \a c to desktop \a desk.
|
||||
|
||||
Takes care of transients as well.
|
||||
*/
|
||||
void Workspace::sendClientToDesktop( Client* c, int desk )
|
||||
{
|
||||
if ( c->isSticky() )
|
||||
c->setSticky( FALSE );
|
||||
|
||||
if ( c->isOnDesktop( desk ) )
|
||||
return;
|
||||
|
||||
c->setDesktop( desk );
|
||||
c->hide();
|
||||
|
||||
for ( ClientList::ConstIterator it = clients.begin(); it != clients.end(); ++it) {
|
||||
if ( (*it)->transientFor() == c->window() ) {
|
||||
sendClientToDesktop( *it, desk );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
Sends the popup client to desktop \a desk
|
||||
|
||||
Internal slot for the window operation menu
|
||||
*/
|
||||
void Workspace::sendToDesktop( int desk )
|
||||
{
|
||||
|
@ -2025,23 +2050,8 @@ void Workspace::sendToDesktop( int desk )
|
|||
return;
|
||||
}
|
||||
|
||||
if ( popup_client->isSticky() )
|
||||
popup_client->setSticky( FALSE );
|
||||
sendClientToDesktop( popup_client, desk );
|
||||
|
||||
if ( popup_client->isOnDesktop( desk ) )
|
||||
return;
|
||||
|
||||
popup_client->setDesktop( desk );
|
||||
popup_client->hide();
|
||||
|
||||
Client* old = popup_client;
|
||||
for ( ClientList::ConstIterator it = clients.begin(); it != clients.end(); ++it) {
|
||||
if ( (*it)->transientFor() == popup_client->window() ) {
|
||||
popup_client = *it;
|
||||
sendToDesktop( desk );
|
||||
popup_client = old;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -147,6 +147,8 @@ public:
|
|||
const ClientList& stackingOrder() const;
|
||||
|
||||
Client* topClientOnDesktop() const;
|
||||
void sendClientToDesktop( Client* c, int desktop );
|
||||
|
||||
|
||||
|
||||
QPopupMenu* clientPopup( Client* );
|
||||
|
|
Loading…
Reference in a new issue