diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2015-03-12 04:19:11 +0100 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2015-03-12 04:19:11 +0100 |
commit | 4dced2c9d230b88e910e46a78e3e559792520ae1 (patch) | |
tree | e6c9c358ed1a70193178b8327b256ca8b01a8680 /src/interface-curses.h | |
parent | 7ceabb232364a4dca0d2418ad1b0dfd01168b145 (diff) | |
download | sciteco-4dced2c9d230b88e910e46a78e3e559792520ae1.tar.gz |
improved ncurses batch mode initialization
* I now understand better why the old initialization worked ;-)
By not calling initscr(), we could prevent some terminal setup
and screen clearing usually performed which would interfere with
with having a clean stdout stream.
However the Curses screen was still basically attached to the
terminal.
* That's why there was screen flickering in urxvt when calling sciteco
(even in batch mode). Also that's why calling batch-mode SciTECO
did not work from other Curses programs (including SciTECO).
* The new implementation directs Curses at /dev/null, so it will
completely stay away from /dev/tty.
* /dev/tty is associated with the Curses screen only when the
interactive mode is initialized. This works elegantly via
freopen() - there's no need to create a new Curses screen.
* This does currently not work on PDCurses where the batch mode
will still initscr() followed by endwin().
I should investigate how newterm() behaves there - especially
on Windows.
Diffstat (limited to 'src/interface-curses.h')
-rw-r--r-- | src/interface-curses.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/interface-curses.h b/src/interface-curses.h index 2a83bcc..5da7e56 100644 --- a/src/interface-curses.h +++ b/src/interface-curses.h @@ -147,7 +147,9 @@ public: void event_loop_impl(void); private: - void init_screen(void); + void init_batch(void); + void init_interactive(void); + void resize_all_windows(void); void draw_info(void); |