more debug output. Call INIT-WINDOWS! only once.
This commit is contained in:
parent
f1880f7a1c
commit
59b2d3006f
|
@ -21,6 +21,12 @@
|
||||||
(height app-window-height)
|
(height app-window-height)
|
||||||
(curses-win app-window-curses-win set-app-window-curses-win!))
|
(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-1 #f)
|
||||||
(define bar-2 #f)
|
(define bar-2 #f)
|
||||||
(define command-frame-window #f)
|
(define command-frame-window #f)
|
||||||
|
@ -233,6 +239,7 @@
|
||||||
;;handle input
|
;;handle input
|
||||||
(define (run)
|
(define (run)
|
||||||
|
|
||||||
|
(init-windows!)
|
||||||
'(set-interrupt-handler interrupt/keyboard
|
'(set-interrupt-handler interrupt/keyboard
|
||||||
(lambda a
|
(lambda a
|
||||||
(set! active-keyboard-interrupt a)))
|
(set! active-keyboard-interrupt a)))
|
||||||
|
@ -415,6 +422,10 @@
|
||||||
(window-init-curses-win! command-frame-window)
|
(window-init-curses-win! command-frame-window)
|
||||||
(window-init-curses-win! command-window)
|
(window-init-curses-win! command-window)
|
||||||
(window-init-curses-win! result-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-1))
|
||||||
(wclear (app-window-curses-win bar-2))
|
(wclear (app-window-curses-win bar-2))
|
||||||
(wclear (app-window-curses-win command-window))
|
(wclear (app-window-curses-win command-window))
|
||||||
|
@ -457,8 +468,7 @@
|
||||||
(wrefresh (app-window-curses-win result-window)))
|
(wrefresh (app-window-curses-win result-window)))
|
||||||
|
|
||||||
(define (paint)
|
(define (paint)
|
||||||
(debug-message "paint called")
|
(debug-message "paint")
|
||||||
(init-windows!)
|
|
||||||
(paint-bar-1)
|
(paint-bar-1)
|
||||||
(paint-bar-2)
|
(paint-bar-2)
|
||||||
(paint-command-frame-window)
|
(paint-command-frame-window)
|
||||||
|
@ -780,6 +790,7 @@
|
||||||
;;Cursor
|
;;Cursor
|
||||||
;;move cursor to the corrct position
|
;;move cursor to the corrct position
|
||||||
(define (move-cursor buffer)
|
(define (move-cursor buffer)
|
||||||
|
(debug-message "move-cursor " buffer)
|
||||||
(if (focus-on-command-buffer?)
|
(if (focus-on-command-buffer?)
|
||||||
(cursor-right-pos (app-window-curses-win command-window)
|
(cursor-right-pos (app-window-curses-win command-window)
|
||||||
buffer)
|
buffer)
|
||||||
|
|
Loading…
Reference in New Issue