CT: fix a stupid jdk-1.3.1 bug. When hiding a dialog and showing it again, the dialog was gaining iconic state.

svn path=/trunk/kdebase/kwin/; revision=139610
This commit is contained in:
Cristian Tibirna 2002-02-28 20:29:13 +00:00
parent f13d425d59
commit b1707e20c1

View file

@ -723,8 +723,15 @@ bool Client::manage( bool isMapped, bool doNotShow, bool isInitial )
} else {
// find out the initial state. Several possibilities exist
XWMHints * hints = XGetWMHints(qt_xdisplay(), win );
if (hints && (hints->flags & StateHint))
if (hints && (hints->flags & StateHint)) {
init_state = hints->initial_state;
//CT extra check for stupid jdk 1.3.1. But should make sense in general
if ((init_state == IconicState) && isTransient() && transientFor() != 0) {
if(!workspace()->findClient(transientFor())->isIconified()) {
init_state = NormalState;
}
}
}
if (hints)
XFree(hints);
}
@ -827,7 +834,7 @@ bool Client::manage( bool isMapped, bool doNotShow, bool isInitial )
}
if ( !doNotShow )
workspace()->updateClientArea();
workspace()->updateClientArea();
return showMe;
}