comparison main.c @ 586:7c593c9303e8

Add another tiny screen update flush check.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 07 Jul 2013 02:09:02 +0300
parents 6d23385c0643
children 573a3ad30938
comparison
equal deleted inserted replaced
585:199fd3371035 586:7c593c9303e8
2122 else 2122 else
2123 if (cres < 0 || !nn_conn_check(conn)) 2123 if (cres < 0 || !nn_conn_check(conn))
2124 editState.isError = TRUE; 2124 editState.isError = TRUE;
2125 2125
2126 // Handle user input 2126 // Handle user input
2127 BOOL flushed = FALSE;
2127 if (appCursesInit) 2128 if (appCursesInit)
2128 { 2129 {
2129 nnwin_input_process(editBuf, &editState, processUserInput); 2130 nnwin_input_process(editBuf, &editState, processUserInput);
2130 nnwin_update(editState.update, editState.mask, editBuf, optUserName, optUserColor); 2131 nnwin_update(editState.update, editState.mask, editBuf, optUserName, optUserColor);
2132 flushed = TRUE;
2131 } 2133 }
2132 2134
2133 if (++updateCount > 10) 2135 if (++updateCount > 10)
2134 { 2136 {
2135 time_t tmpTime = time(NULL); 2137 time_t tmpTime = time(NULL);
2145 { 2147 {
2146 colorSet = TRUE; 2148 colorSet = TRUE;
2147 nn_conn_send_msg_v(conn, optUserNameEnc, "%%2FSetFontColor%%20%%2Dcolor%%20%06X", optUserColor); 2149 nn_conn_send_msg_v(conn, optUserNameEnc, "%%2FSetFontColor%%20%%2Dcolor%%20%06X", optUserColor);
2148 } 2150 }
2149 2151
2150 if (appCursesInit) 2152 if (appCursesInit && !flushed)
2151 { 2153 {
2152 nnwin_update(FALSE, editState.mask, editBuf, optUserName, optUserColor); 2154 nnwin_update(FALSE, editState.mask, editBuf, optUserName, optUserColor);
2153 } 2155 }
2154 2156
2155 updateCount = 0; 2157 updateCount = 0;