implemented raise/lower

svn path=/trunk/kdebase/kwin/; revision=48888
This commit is contained in:
Matthias Ettrich 2000-05-08 19:37:54 +00:00
parent 68510e52c8
commit f2bb598e46
2 changed files with 30 additions and 6 deletions

View file

@ -713,6 +713,9 @@ bool Client::configureRequest( XConfigureRequestEvent& e )
}
}
bool stacking = e.value_mask & CWStackMode;
int stack_mode = e.detail;
if ( e.value_mask & CWBorderWidth ) {
// first, get rid of a window border
XWindowChanges wc;
@ -743,7 +746,23 @@ bool Client::configureRequest( XConfigureRequestEvent& e )
resize( sizeForWindowSize( QSize( nw, nh ) ) );
}
// TODO handle stacking!
if ( stacking ){
switch (stack_mode){
case Above:
case TopIf:
qDebug("raise client %s", caption().latin1());
workspace()->raiseClient( this );
break;
case Below:
case BottomIf:
workspace()->lowerClient( this );
break;
case Opposite:
default:
break;
}
}
sendSynteticConfigureNotify();
return TRUE;

View file

@ -122,20 +122,20 @@ Client* Workspace::clientFactory( Workspace *ws, WId w )
XLowerWindow( qt_xdisplay(), w );
Client * c = new NoBorderClient( ws, w);
c->setSticky( TRUE );
c->setMayMove( FALSE );
c->setMayMove( FALSE );
ws->setDesktopClient( c );
return c;
}
if ( s == "Kicker" ) {
Client * c = new NoBorderClient( ws, w);
c->setSticky( TRUE );
c->setMayMove( FALSE );
c->setMayMove( FALSE );
return c;
}
if ( s == "MAC MENU [menu]" ) {
Client * c = new NoBorderClient( ws, w);
c->setSticky( TRUE );
c->setMayMove( FALSE );
c->setMayMove( FALSE );
return c;
}
if ( ( s.right(6) == "[menu]" ) || ( s.right(7) == "[tools]" ) ) {
@ -1409,13 +1409,18 @@ void Workspace::raiseClient( Client* c )
{
if ( !c )
return;
if ( c == desktop_client )
ClientList saveset;
if ( c == desktop_client ) {
saveset.clear();
saveset.append( c );
raiseTransientsOf(saveset, c );
return; // deny
}
stacking_order.remove( c );
stacking_order.append( c );
ClientList saveset;
if ( c->transientFor() ) {
saveset.append( c );
Client* t = findClient( c->transientFor() );