mirror of https://github.com/macssh/macssh.git
select terminal before requesting dialog
This commit is contained in:
parent
211263222b
commit
5883e1a691
|
@ -510,13 +510,28 @@ static void AddPassToKeychain(const char *prompt, StringPtr password)
|
|||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* ActivateTerminal
|
||||
*/
|
||||
|
||||
static void ActivateTerminal(WindowPtr wind)
|
||||
{
|
||||
if ( wind && FrontWindow() != wind ) {
|
||||
SelectWindow( wind );
|
||||
do {
|
||||
EventRecord theEvent;
|
||||
if ( WaitNextEvent(activMask | updateMask, &theEvent, 0, 0L) ) {
|
||||
HandleEvent(&theEvent);
|
||||
}
|
||||
} while ( FrontWindow() != wind );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* SSH2PasswordDialog
|
||||
*/
|
||||
|
||||
|
||||
|
||||
Boolean SSH2PasswordDialog(const char *prompt, StringPtr password)
|
||||
Boolean SSH2PasswordDialog(const char *prompt, StringPtr password, WindowPtr term)
|
||||
{
|
||||
DialogPtr dlog;
|
||||
short item = 0;
|
||||
|
@ -537,6 +552,8 @@ Boolean SSH2PasswordDialog(const char *prompt, StringPtr password)
|
|||
|
||||
InteractWithUser( true, 128, 128 );
|
||||
|
||||
ActivateTerminal(term);
|
||||
|
||||
SetUpMovableModalMenus();
|
||||
internalBufferFilterUPP = NewModalFilterProc(InternalBufferFilter);
|
||||
*password = '\0';
|
||||
|
|
Loading…
Reference in New Issue