more debug output. Call INIT-WINDOWS! only once.

This commit is contained in:
eknauel 2005-05-18 15:47:28 +00:00
parent f1880f7a1c
commit 59b2d3006f
1 changed files with 13 additions and 2 deletions

View File

@ -21,6 +21,12 @@
(height app-window-height)
(curses-win app-window-curses-win set-app-window-curses-win!))
(define-record-discloser :app-window
(lambda (rec)
`(app-window
(x ,(app-window-x rec)) (y ,(app-window-y rec))
(w ,(app-window-width rec)) (h ,(app-window-height rec)))))
(define bar-1 #f)
(define bar-2 #f)
(define command-frame-window #f)
@ -233,6 +239,7 @@
;;handle input
(define (run)
(init-windows!)
'(set-interrupt-handler interrupt/keyboard
(lambda a
(set! active-keyboard-interrupt a)))
@ -415,6 +422,10 @@
(window-init-curses-win! command-frame-window)
(window-init-curses-win! command-window)
(window-init-curses-win! result-window)
(debug-message "init-windows!: bar-1 " bar-1 " bar-2 " bar-2
" command-frame-window " command-frame-window
" command-window " command-window
" result-window " result-window)
(wclear (app-window-curses-win bar-1))
(wclear (app-window-curses-win bar-2))
(wclear (app-window-curses-win command-window))
@ -457,8 +468,7 @@
(wrefresh (app-window-curses-win result-window)))
(define (paint)
(debug-message "paint called")
(init-windows!)
(debug-message "paint")
(paint-bar-1)
(paint-bar-2)
(paint-command-frame-window)
@ -780,6 +790,7 @@
;;Cursor
;;move cursor to the corrct position
(define (move-cursor buffer)
(debug-message "move-cursor " buffer)
(if (focus-on-command-buffer?)
(cursor-right-pos (app-window-curses-win command-window)
buffer)