Set nodelay mode once and for all during window creation
This commit is contained in:
		
							parent
							
								
									40eed873a2
								
							
						
					
					
						commit
						406aeafd2e
					
				| 
						 | 
				
			
			@ -503,9 +503,12 @@
 | 
			
		|||
(import-lambda-definition newwin-internal
 | 
			
		||||
  (height width starty startx)
 | 
			
		||||
  "scsh_newwin")
 | 
			
		||||
 | 
			
		||||
(define (newwin h w x y)
 | 
			
		||||
  (make-window (or (newwin-internal h w x y)
 | 
			
		||||
		   (raise-curses-error "newwin"))))
 | 
			
		||||
  (let ((win (make-window (or (newwin-internal h w x y)
 | 
			
		||||
                              (raise-curses-error "newwin")))))
 | 
			
		||||
    (nodelay win #t)
 | 
			
		||||
    win))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
(import-lambda-definition delwin-internal
 | 
			
		||||
| 
						 | 
				
			
			@ -915,13 +918,11 @@
 | 
			
		|||
  (win)
 | 
			
		||||
  "scsh_wgetch")
 | 
			
		||||
(define (wgetch win)
 | 
			
		||||
  (nodelay win #t)
 | 
			
		||||
  (let ((ch (wgetch-internal (window-c-pointer win))))
 | 
			
		||||
    (if (not (= err ch))
 | 
			
		||||
	ch
 | 
			
		||||
	(begin
 | 
			
		||||
	  (select-port-channels #f (current-input-port))
 | 
			
		||||
	  (nodelay win #f)
 | 
			
		||||
	  (wgetch-internal (window-c-pointer win))))))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue