fixed desktop handling
svn path=/trunk/kdebase/kwin/; revision=33068
This commit is contained in:
parent
1884091309
commit
d21739331f
1 changed files with 17 additions and 5 deletions
|
@ -23,8 +23,10 @@ static Client* clientFactory( Workspace *ws, WId w )
|
||||||
s = QString::fromLatin1( name );
|
s = QString::fromLatin1( name );
|
||||||
XFree( name );
|
XFree( name );
|
||||||
}
|
}
|
||||||
if ( s == "desktop" ) {
|
if ( s == "THE DESKTOP" ) {
|
||||||
|
XLowerWindow( qt_xdisplay(), w );
|
||||||
Client * c = new NoBorderClient( ws, w);
|
Client * c = new NoBorderClient( ws, w);
|
||||||
|
c->setSticky( TRUE );
|
||||||
ws->setDesktopClient( c );
|
ws->setDesktopClient( c );
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
@ -112,9 +114,10 @@ void Workspace::init()
|
||||||
continue;
|
continue;
|
||||||
if (attr.map_state != IsUnmapped) {
|
if (attr.map_state != IsUnmapped) {
|
||||||
Client* c = clientFactory( this, wins[i] );
|
Client* c = clientFactory( this, wins[i] );
|
||||||
clients.append( c );
|
if ( c != desktop_client ) {
|
||||||
if ( c != desktop_client )
|
clients.append( c );
|
||||||
stacking_order.append( c );
|
stacking_order.append( c );
|
||||||
|
}
|
||||||
focus_chain.append( c );
|
focus_chain.append( c );
|
||||||
c->manage( TRUE );
|
c->manage( TRUE );
|
||||||
if ( c == desktop_client )
|
if ( c == desktop_client )
|
||||||
|
@ -135,6 +138,12 @@ void Workspace::init()
|
||||||
|
|
||||||
Workspace::~Workspace()
|
Workspace::~Workspace()
|
||||||
{
|
{
|
||||||
|
if ( desktop_client ) {
|
||||||
|
WId win = desktop_client->window();
|
||||||
|
delete desktop_client;
|
||||||
|
XMapWindow( qt_xdisplay(), win );
|
||||||
|
XLowerWindow( qt_xdisplay(), win );
|
||||||
|
}
|
||||||
for ( ClientList::ConstIterator it = clients.begin(); it != clients.end(); ++it) {
|
for ( ClientList::ConstIterator it = clients.begin(); it != clients.end(); ++it) {
|
||||||
WId win = (*it)->window();
|
WId win = (*it)->window();
|
||||||
delete (*it);
|
delete (*it);
|
||||||
|
@ -186,9 +195,10 @@ bool Workspace::workspaceEvent( XEvent * e )
|
||||||
// TODO may use QWidget:.create
|
// TODO may use QWidget:.create
|
||||||
XReparentWindow( qt_xdisplay(), c->winId(), root, 0, 0 );
|
XReparentWindow( qt_xdisplay(), c->winId(), root, 0, 0 );
|
||||||
}
|
}
|
||||||
clients.append( c );
|
if ( c != desktop_client ) {
|
||||||
if ( c != desktop_client )
|
clients.append( c );
|
||||||
stacking_order.append( c );
|
stacking_order.append( c );
|
||||||
|
}
|
||||||
propagateClients();
|
propagateClients();
|
||||||
}
|
}
|
||||||
bool result = c->windowEvent( e );
|
bool result = c->windowEvent( e );
|
||||||
|
@ -262,6 +272,8 @@ Client* Workspace::findClient( WId w ) const
|
||||||
if ( (*it)->window() == w )
|
if ( (*it)->window() == w )
|
||||||
return *it;
|
return *it;
|
||||||
}
|
}
|
||||||
|
if ( desktop_client && w == desktop_client->window() )
|
||||||
|
return desktop_client;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue