newtDefaultMappedHandler,
} ;
+int needResize = 0;
+
static inline int componentFits(newtComponent co, int compNum) {
struct form * form = co->data;
struct element * el = form->elements + compNum;
timeout.tv_sec = timeout.tv_usec = 0;
}
+ if (needResize) {
+ needResize = 0;
+ newtResizeScreen(1);
+ }
+
i = select(max + 1, &readSet, &writeSet, &exceptSet,
form->timer ? &timeout : NULL);
if (i < 0) continue; /* ?? What should we do here? */
key = newtGetKey();
- if (key == NEWT_KEY_RESIZE) {
- newtResizeScreen(1);
- continue;
- }
-
for (i = 0; i < form->numHotKeys; i++) {
if (form->hotKeys[i] == key) {
es->reason = NEWT_EXIT_HOTKEY;
static char ** currentHelpline = NULL;
static int cursorRow, cursorCol;
-static int needResize = 0;
static int cursorOn = 1;
static int trashScreen = 0;
+extern int needResize;
static const char * defaultHelpLine =
" <Tab>/<Alt-Tab> between elements | <Space> selects | <F12> next screen"
* @param redraw - boolean - should we redraw the screen?
*/
void newtResizeScreen(int redraw) {
+ /* we can't redraw from scratch, just redisplay SLang screen */
SLtt_get_screen_size();
- SLsmg_reinit_smg();
+ /* SLsmg_reinit_smg(); */
if (redraw) {
SLsmg_touch_lines (0, SLtt_Screen_Rows - 1);
newtRefresh();
newtCursorOff();
initKeymap();
- /*memset(&sa, 0, sizeof(sa));
- sa.sa_handler = handleSigwinch;
- sigaction(SIGWINCH, &sa, NULL);*/
-
SLsignal_intr(SIGWINCH, handleSigwinch);
SLang_getkey_intr_hook = getkeyInterruptHook;