comparison mcabber/src/main.c @ 322:da138cdebf04

Implement auto-away mode
author Mikael Berthe <mikael@lilotux.net>
date Fri, 15 Jul 2005 22:08:53 +0100
parents 1ceb68eb2fc1
children db5bebe96c89
comparison
equal deleted inserted replaced
321:59193965f2cb 322:da138cdebf04
266 key = scr_Getch(); 266 key = scr_Getch();
267 267
268 /* The refresh is really an ugly hack, but we need to call doupdate() 268 /* The refresh is really an ugly hack, but we need to call doupdate()
269 from time to time to catch the RESIZE events, because getch keep 269 from time to time to catch the RESIZE events, because getch keep
270 returning ERR until a real key is pressed :-( 270 returning ERR until a real key is pressed :-(
271 However, it allows us to handle an autoaway check here...
271 */ 272 */
272 if (key != ERR) { 273 if (key != ERR) {
273 ret = process_key(key); 274 ret = process_key(key);
274 refresh = 0; 275 refresh = 0;
275 } else if (refresh++ > 1) { 276 } else if (refresh++ > 1) {
276 doupdate(); 277 doupdate();
277 refresh = 0; 278 refresh = 0;
279 scr_CheckAutoAway(FALSE);
278 } 280 }
279 281
280 if (key != KEY_RESIZE) 282 if (key != KEY_RESIZE)
281 jb_main(); 283 jb_main();
282 if (update_roster) 284 if (update_roster)