react properly on sendClientToDesktop requests from kicker

svn path=/trunk/kdebase/kwin/; revision=54143
This commit is contained in:
Matthias Ettrich 2000-06-23 18:56:59 +00:00
parent 6ed208596c
commit 3693e4ba80
3 changed files with 36 additions and 21 deletions

View file

@ -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,

View file

@ -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 )
{
@ -2024,24 +2049,9 @@ void Workspace::sendToDesktop( int desk )
popup_client->setSticky( !popup_client->isSticky() );
return;
}
sendClientToDesktop( popup_client, desk );
if ( popup_client->isSticky() )
popup_client->setSticky( FALSE );
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;
}
}
}

View file

@ -147,6 +147,8 @@ public:
const ClientList& stackingOrder() const;
Client* topClientOnDesktop() const;
void sendClientToDesktop( Client* c, int desktop );
QPopupMenu* clientPopup( Client* );
@ -172,7 +174,7 @@ public:
void cascadeDesktop();
void unclutterDesktop();
void reconfigure();
public slots:
void setCurrentDesktop( int new_desktop );
@ -223,7 +225,7 @@ private:
void freeKeyboard(bool pass);
Client* clientFactory(WId w);
void raiseTransientsOf( ClientList& safeset, Client* c );
void lowerTransientsOf( ClientList& safeset, Client* c );
void randomPlacement(Client* c);