transients do not need iconify, sticky or maximize

svn path=/trunk/kdebase/kwin/; revision=61029
This commit is contained in:
Matthias Ettrich 2000-08-14 22:02:14 +00:00
parent 97d6e48a3d
commit eddd91cb51

View file

@ -359,6 +359,12 @@ KDEClient::KDEClient( Workspace *ws, WId w, QWidget *parent,
hb->addWidget( button[BtnSticky]); hb->addWidget( button[BtnSticky]);
hb->addWidget( button[BtnIconify]); hb->addWidget( button[BtnIconify]);
hb->addWidget( button[BtnMax]); hb->addWidget( button[BtnMax]);
if ( isTransient() ) {
button[BtnSticky]->hide();
button[BtnIconify]->hide();
button[BtnMax]->hide();
}
hiddenItems = false; hiddenItems = false;
} }
@ -532,7 +538,7 @@ void KDEClient::calcHiddenButtons()
int i; int i;
for(i=0; i<5; ++i){ for(i=0; i<5; ++i){
if(button[i]){ if(button[i]){
if(button[i]->isVisible()){ if( !button[i]->isHidden() ) {
button[i]->hide(); button[i]->hide();
} }
minWidth-=button[i]->sizeHint().width(); minWidth-=button[i]->sizeHint().width();
@ -550,7 +556,7 @@ void KDEClient::calcHiddenButtons()
if(button[i]){ if(button[i]){
if(button[i]->sizeHint().width() + totalSize <= width()){ if(button[i]->sizeHint().width() + totalSize <= width()){
totalSize+=button[i]->sizeHint().width(); totalSize+=button[i]->sizeHint().width();
if(!button[i]->isVisible()){ if(button[i]->isHidden() && ( !isTransient() || ( i != BtnIconify && i != BtnSticky && i != BtnMax ) ) ){
button[i]->resize(button[i]->sizeHint()); button[i]->resize(button[i]->sizeHint());
button[i]->show(); button[i]->show();
} }