mirror of https://github.com/macssh/macssh.git
movable modal unfiltered events fix.
This commit is contained in:
parent
b5ae9bd440
commit
809fc15125
|
@ -21,6 +21,8 @@ extern void ssh2_sched();
|
|||
|
||||
extern MenuHandle myMenus[];
|
||||
|
||||
int gMovableModal = 0;
|
||||
|
||||
pascal void movableModalDialog(ModalFilterUPP filter, short *theItem)
|
||||
{
|
||||
EventRecord theEvent;
|
||||
|
@ -31,6 +33,7 @@ pascal void movableModalDialog(ModalFilterUPP filter, short *theItem)
|
|||
GetPort(&oldPort);
|
||||
SetPort(thisDialog);
|
||||
|
||||
++gMovableModal;
|
||||
for(;;) {
|
||||
WaitNextEvent(everyEvent, &theEvent, gApplicationPrefs->TimeSlice, 0L);
|
||||
|
||||
|
@ -54,6 +57,7 @@ pascal void movableModalDialog(ModalFilterUPP filter, short *theItem)
|
|||
break;
|
||||
|
||||
}
|
||||
--gMovableModal;
|
||||
SetPort(oldPort);
|
||||
}
|
||||
|
||||
|
|
|
@ -64,6 +64,7 @@ Boolean haveNotifiedLowMemory = FALSE;
|
|||
Boolean gPresentOpenConnectionDialog;
|
||||
unsigned long gPresentOpenConnectionTicks;
|
||||
|
||||
extern int gMovableModal;
|
||||
|
||||
extern void ssh2_sched();
|
||||
extern Boolean gThreadModal;
|
||||
|
@ -112,7 +113,7 @@ void main(void)
|
|||
|
||||
do { /* BYU - Do this forever */
|
||||
UnloadSegments();
|
||||
if (!gThreadModal) {
|
||||
if (!gThreadModal && !gMovableModal) {
|
||||
DoEvents(NULL);
|
||||
}
|
||||
ssh2_sched();
|
||||
|
|
|
@ -66,6 +66,8 @@
|
|||
|
||||
extern ApplicationPrefs *gApplicationPrefs;
|
||||
|
||||
extern int gMovableModal;
|
||||
|
||||
extern int appl_main(int argc, char **argv);
|
||||
extern char *applname;
|
||||
extern char *defargstr;
|
||||
|
@ -1007,7 +1009,7 @@ void ssh2_doevent(long sleepTime)
|
|||
extern Boolean haveNotifiedLowMemory;
|
||||
|
||||
if ( key_gen == 0 ) {
|
||||
if (!gThreadModal) {
|
||||
if (!gThreadModal && !gMovableModal) {
|
||||
DoEvents(NULL);
|
||||
}
|
||||
if (!TelInfo->done) {
|
||||
|
@ -1021,7 +1023,7 @@ void ssh2_doevent(long sleepTime)
|
|||
haveNotifiedLowMemory = true;
|
||||
}
|
||||
} else {
|
||||
if (!gThreadModal) {
|
||||
if (!gThreadModal && !gMovableModal) {
|
||||
static unsigned long lastTicks = 0L;
|
||||
if ( (LMGetTicks() - lastTicks) >= 10 ) {
|
||||
EventRecord myEvent;
|
||||
|
|
Loading…
Reference in New Issue