make kwin adjust to shape changes

svn path=/trunk/kdebase/kwin/; revision=71049
icc-effect-5.14.5
Matthias Ettrich 2000-11-16 19:08:05 +00:00
parent 8dde856133
commit 258a7be78a
2 changed files with 17 additions and 11 deletions

View File

@ -592,6 +592,7 @@ bool Client::manage( bool isMapped, bool doNotShow, bool isInitial )
move( x(), area.bottom() - height() );
}
XShapeSelectInput( qt_xdisplay(), win, ShapeNotifyMask );
if ( (is_shape = Shape::hasShape( win )) ) {
updateShape();
}
@ -835,6 +836,8 @@ bool Client::windowEvent( XEvent * e)
if ( isActive() )
workspace()->updateColormap();
default:
if ( e->type == Shape::shapeEvent() )
updateShape();
break;
}

View File

@ -90,7 +90,7 @@ static bool block_focus = FALSE;
// does the window w need a shape combine mask around it?
bool Shape::hasShape( WId w){
int xws, yws, xbs, ybs;
unsigned wws, hws, wbs, hbs;
unsigned int wws, hws, wbs, hbs;
int boundingShaped, clipShaped;
if (!kwin_has_shape)
return FALSE;
@ -1957,22 +1957,24 @@ bool Workspace::netCheck( XEvent* e )
*/
void Workspace::propagateClients( bool onlyStacking )
{
WId* cl;
Window *cl; // MW we should not assume WId and Window to be compatible
// when passig pointers around.
int i;
if ( !onlyStacking ) {
cl = new WId[ clients.count()];
cl = new Window[ clients.count()];
i = 0;
for ( ClientList::ConstIterator it = clients.begin(); it != clients.end(); ++it )
cl[i++] = (*it)->window();
rootInfo->setClientList( (Window*) cl, i );
rootInfo->setClientList( cl, i );
delete [] cl;
}
cl = new WId[ stacking_order.count()];
cl = new Window[ stacking_order.count()];
i = 0;
for ( ClientList::ConstIterator it = stacking_order.begin(); it != stacking_order.end(); ++it)
cl[i++] = (*it)->window();
rootInfo->setClientListStacking( (Window*) cl, i );
rootInfo->setClientListStacking( cl, i );
delete [] cl;
}
@ -2033,13 +2035,14 @@ bool Workspace::iconifyMeansWithdraw( Client* c)
*/
void Workspace::propagateSystemTrayWins()
{
WId* cl = new WId[ systemTrayWins.count()];
Window *cl = new Window[ systemTrayWins.count()];
int i = 0;
for ( SystemTrayWindowList::ConstIterator it = systemTrayWins.begin(); it != systemTrayWins.end(); ++it ) {
cl[i++] = (*it).win;
}
rootInfo->setKDESystemTrayWindows( (Window*) cl, i );
rootInfo->setKDESystemTrayWindows( cl, i );
delete [] cl;
}