diff --git a/COMPLIANCE b/COMPLIANCE index c0e4b3c8de..9d3b971a96 100644 --- a/COMPLIANCE +++ b/COMPLIANCE @@ -42,14 +42,16 @@ _NET_SUPPORTED root window property COMPLETE | sence that all implemented properties are listed here. | +----------------------------------------------------------------+ CHECKME : check it's complete -_NET_CLIENT_LIST root window property COMPLETE +_NET_CLIENT_LIST root window property PARTIAL +----------------------------------------------------------------+ | With xprop it seems only one WinID is stored, whereas an array | | of all managed windows should be stored instead! | | This is caused by xprop printing only first element of WINDOW | | type properties, xprop has to be patched to see them all. | + | The spec requires this list contains the windows in their | + | initial mapping order, which is not true for NET::Desktop | + | windows. | +----------------------------------------------------------------+ - CHECKME : check that the list includes all windows _NET_CLIENT_LIST_STACKING root window property COMPLETE +----------------------------------------------------------------+ | With xprop it seems only one WinID is stored, whereas an array | diff --git a/workspace.cpp b/workspace.cpp index 84f5e28100..7ff1afc97f 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -797,9 +797,11 @@ QRect Workspace::geometry() const void Workspace::removeClient( Client* c) { + Q_ASSERT( clients.contains( c ) || desktops.contains( c )); clients.remove( c ); stacking_order.remove( c ); focus_chain.remove( c ); + desktops.remove( c ); propagateClients(); } @@ -818,8 +820,7 @@ bool Workspace::destroyClient( Client* c) storeFakeSessionInfo( c ); - if (clients.contains(c)) - removeClient(c); + removeClient(c); c->invalidateWindow(); clientHidden( c ); @@ -2492,16 +2493,20 @@ void Workspace::propagateClients( bool onlyStacking ) int i; if ( !onlyStacking ) { - cl = new Window[ clients.count()]; + cl = new Window[ desktops.count() + clients.count()]; i = 0; + for ( ClientList::ConstIterator it = desktops.begin(); it != desktops.end(); ++it ) + cl[i++] = (*it)->window(); for ( ClientList::ConstIterator it = clients.begin(); it != clients.end(); ++it ) cl[i++] = (*it)->window(); rootInfo->setClientList( cl, i ); delete [] cl; } - cl = new Window[ stacking_order.count()]; + cl = new Window[ desktops.count() + stacking_order.count()]; i = 0; + for ( ClientList::ConstIterator it = desktops.begin(); it != desktops.end(); ++it ) + cl[i++] = (*it)->window(); for ( ClientList::ConstIterator it = stacking_order.begin(); it != stacking_order.end(); ++it) cl[i++] = (*it)->window(); rootInfo->setClientListStacking( cl, i );