comparison nnchat.c @ 389:19cb995994c9

Change screen update strategy a bit.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 20 May 2012 23:35:00 +0300
parents f45673fe6b23
children a2b7ac328e62
comparison
equal deleted inserted replaced
388:f45673fe6b23 389:19cb995994c9
1835 } 1835 }
1836 break; 1836 break;
1837 } 1837 }
1838 } while (c != ERR && !exitProg && ++cnt < 10); 1838 } while (c != ERR && !exitProg && ++cnt < 10);
1839 1839
1840 updateMainWin(updateMain);
1841
1840 if (update || firstUpdate) { 1842 if (update || firstUpdate) {
1841 /* Update edit line */ 1843 /* Update edit line */
1844 updateStatus();
1842 printEditBuf(editBuf); 1845 printEditBuf(editBuf);
1843 updateStatus();
1844 firstUpdate = FALSE; /* a nasty hack ... */ 1846 firstUpdate = FALSE; /* a nasty hack ... */
1845 } 1847 }
1846 1848
1847 updateMainWin(updateMain);
1848 } /* cursesInit */ 1849 } /* cursesInit */
1849 1850
1850 if (++updateCount > 10) { 1851 if (++updateCount > 10) {
1851 time_t tmpTime = time(NULL); 1852 time_t tmpTime = time(NULL);
1852 if (tmpTime - prevTime > SET_KEEPALIVE) { 1853 if (tmpTime - prevTime > SET_KEEPALIVE) {
1860 colorSet = TRUE; 1861 colorSet = TRUE;
1861 nn_conn_send_msg(conn, optUserNameEnc, "%%2FSetFontColor%%20%%2Dcolor%%20%06X", optUserColor); 1862 nn_conn_send_msg(conn, optUserNameEnc, "%%2FSetFontColor%%20%%2Dcolor%%20%06X", optUserColor);
1862 } 1863 }
1863 1864
1864 updateStatus(); 1865 updateStatus();
1866 printEditBuf(editBuf);
1865 updateCount = 0; 1867 updateCount = 0;
1866 } 1868 }
1867 1869
1868 } 1870 }
1869 1871