Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zcurses version of tetris

On Jul 16,  3:22pm, Mikael Magnusson wrote:
} 2a. resizing the window causes 'zcurses input' to wait forever for a
} key, even with a timeout defined.

This probably has something to do with the special-casing around wgetch()
for signals handled by the "trap" command.  See the big comment in
Src/Modules/curses.c lines 1073-1103.

It may be problematic to mix curses with the generic signal handling in
the main shell.  We may need to swap in a SIGWINCH handler wrapper while
the curses UI is active, and restore the main handler when leaving it.

} 2b. resizing the window doesn't cause an event while running the
} program, but if i resize before starting(?) i get an event RESIZE on
} my first input call.

There's probably some state that needs to be cleared on entry to
zccmd_input() so that curses doesn't see something left over from the
previous signal.  Unfortunately I don't know what that would be.

Messages sorted by: Reverse Date, Date, Thread, Author