Prevent multiple catatonia messages.
authorGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Wed, 8 Sep 1993 04:46:00 +0000 (04:46 +0000)
committerGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Wed, 8 Sep 1993 04:46:00 +0000 (04:46 +0000)
v7/src/microcode/ntgui.h
v7/src/microcode/ntsig.c
v7/src/microcode/ntutl/scheme16.c
v7/src/microcode/ntutl/scheme32.c

index 4608e7f1705549205d738d757a772b62e75700cb..b45a6f38b554f556fe723e79737bd04cb5fff683 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Id: ntgui.h,v 1.4 1993/09/04 07:04:23 gjr Exp $
+$Id: ntgui.h,v 1.5 1993/09/08 04:44:41 gjr Exp $
 
 Copyright (c) 1993 Massachusetts Institute of Technology
 
@@ -57,7 +57,8 @@ MIT in each case. */
 #ifndef REGBLOCK_CATATONIA_COUNTER
 /* They must be contiguous, with counter being lower. */
 # define REGBLOCK_CATATONIA_COUNTER REGBLOCK_MINIMUM_LENGTH
-# define REGBLOCK_CATATONIA_LIMIT   (REGBLOCK_MINIMUM_LENGTH + 1)
+# define REGBLOCK_CATATONIA_LIMIT   (REGBLOCK_CATATONIA_COUNTER + 1)
+# define REGBLOCK_CATATONIA_FLAG    (REGBLOCK_CATATONIA_COUNTER + 2)
 #endif
 
 #define WM_CATATONIC (WM_USER)
index ca31944d264e921966b70485283771a2855ecd97..9aae23e3d769404343613f9ced8081d6542b702c 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Id: ntsig.c,v 1.11 1993/09/07 19:03:46 gjr Exp $
+$Id: ntsig.c,v 1.12 1993/09/08 04:44:06 gjr Exp $
 
 Copyright (c) 1992-1993 Massachusetts Institute of Technology
 
@@ -419,6 +419,7 @@ DEFUN_VOID (install_timer)
   Registers[REGBLOCK_CATATONIA_COUNTER] = 0;
   Registers[REGBLOCK_CATATONIA_LIMIT]
     = (CATATONIA_PERIOD / ASYNC_TIMER_PERIOD);
+  Registers[REGBLOCK_CATATONIA_FLAG] = 0;
   switch (win32_install_async_timer (&timer_state,
                                     &Registers[0],
                                     REGBLOCK_MEMTOP,
index 264d5757fc832bda3b4837929f8668ecb0778337..b37d422aa330659791a940be25379e95cbaa6acb 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Id: scheme16.c,v 1.5 1993/09/04 06:59:59 gjr Exp $
+$Id: scheme16.c,v 1.6 1993/09/08 04:46:00 gjr Exp $
 
 Copyright (c) 1993 Massachusetts Institute of Technology
 
@@ -340,10 +340,14 @@ scheme_asynctimer (void)
         > scm_timer->base[scm_timer->ctr_off + 1])
        && (scm_timer->base[scm_timer->ctr_off + 1] != 0))
     {
-      PostMessage (scm_timer->window,
-                  scm_timer->message,
-                  ((WPARAM) 0),
-                  ((LPARAM) 0));
+      if (scm_timer->base[scm_timer->ctr_off + 2] == 0)
+      {
+       PostMessage (scm_timer->window,
+                    scm_timer->message,
+                    ((WPARAM) 0),
+                    ((LPARAM) 0));
+       scm_timer->base[scm_timer->ctr_off + 2] = 1;
+      }
       scm_timer->base[scm_timer->ctr_off] = 0L;
     }
     scm_timer = scm_timer->next;
index 650598ede55f0a59e8b894606640abfa9049e98e..3cb33c1ab78b9f394723bed1a99923229860b7e5 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Id: scheme32.c,v 1.5 1993/09/04 07:01:12 gjr Exp $
+$Id: scheme32.c,v 1.6 1993/09/08 04:45:26 gjr Exp $
 
 Copyright (c) 1993 Massachusetts Institute of Technology
 
@@ -111,10 +111,14 @@ win32_nt_timer_tick (UINT wID, UINT wMsg, DWORD dwUser, DWORD dw1, DWORD dw2)
        > timer_closure->block[timer_closure->ctr_off + 1])
       && (timer_closure->block[timer_closure->ctr_off + 1] != 0))
   {
-    PostMessage (timer_closure->window,
-                timer_closure->message,
-                ((WPARAM) 0),
-                ((LPARAM) 0));
+    if (timer_closure->block[timer_closure->ctr_off + 2] == 0)
+    {
+      PostMessage (timer_closure->window,
+                  timer_closure->message,
+                  ((WPARAM) 0),
+                  ((LPARAM) 0));
+      timer_closure->block[timer_closure->ctr_off + 2] = 1;
+    }
     timer_closure->block[timer_closure->ctr_off] = 0;
   }
   return;