确实会出现这样的情况
源码是
QWSWindow* QWSServer::newWindow(int id, QWSClient* client)
{
// Make a new window, put it on top.
QWSWindow* w = new QWSWindow(id,client);
int idx = rgnMan->add( id, QRegion() );
if ( idx < 0 ) {
qWarning( "Exceeded maximum top-level windows" );
disconnectClient( client );
return 0;
}
w->setAllocationIndex( idx );
// insert after "stays on top" windows
QWSWindow *win = windows.first();
bool added = FALSE;
while ( win ) {
if ( !win->onTop ) {
windows.insert( windows.at(), w );
added = TRUE;
break;
}
win = windows.next();
}
if ( !added )
windows.append( w );
emit windowEvent( w, Create );
return w;
}