Tk Source Code

Artifact [512dbfbf]
Login

Artifact 512dbfbfa3a295912730f0d761bbbc11342b25484aa8bee0bfb83acbbfb21418:

Attachment "setupProc.patch" to ticket [c98281be] added by marc_culler 2019-11-18 16:38:21.
Index: macosx/tkMacOSXNotify.c
==================================================================
--- macosx/tkMacOSXNotify.c
+++ macosx/tkMacOSXNotify.c
@@ -286,11 +286,10 @@
 static void
 TkMacOSXEventsSetupProc(
     ClientData clientData,
     int flags)
 {
-    static Bool havePeriodicEvents = NO;
     NSString *runloopMode = [[NSRunLoop currentRunLoop] currentMode];
 
     /*
      * runloopMode will be nil if we are in a Tcl event loop.
      */
@@ -309,24 +308,11 @@
 			inMode:GetRunLoopMode(TkMacOSXGetModalSession())
 			dequeue:NO];
 	if (currentEvent) {
 	    if (currentEvent.type > 0) {
 		Tcl_SetMaxBlockTime(&zeroBlockTime);
-		[NSEvent stopPeriodicEvents];
-		havePeriodicEvents = NO;
 	    }
-	} else if (!havePeriodicEvents){
-
-	    /*
-	     * When the user is not generating events we schedule a "hearbeat"
-	     * event to fire every 0.1 seconds.  This helps to make the vwait
-	     * command more responsive when there is no user input, e.g. when
-	     * running the test suite.
-	     */
-
-	    havePeriodicEvents = YES;
-	    [NSEvent startPeriodicEventsAfterDelay:0.0 withPeriod:0.1];
 	}
     }
 }
 
 /*