comparison mcabber/src/main.c @ 1657:c4ee6d99f75b

Fix resize event handling issue (reported by mvuets)
author Mikael Berthe <mikael@lilotux.net>
date Sat, 05 Dec 2009 19:04:46 +0100
parents fca9a4c17432
children c3d0cb4dc9d4
comparison
equal deleted inserted replaced
1656:fbab3c1300d5 1657:c4ee6d99f75b
271 if (revents) 271 if (revents)
272 return TRUE; 272 return TRUE;
273 return FALSE; 273 return FALSE;
274 } 274 }
275 275
276 static gboolean mcabber_source_dispatch(GSource *source, GSourceFunc callback, 276 static gboolean keyboard_activity(void)
277 gpointer udata)
278 { 277 {
279 keycode kcode; 278 keycode kcode;
280 279
281 if (terminate_ui) { 280 if (terminate_ui) {
282 return FALSE; 281 return FALSE;
291 } 290 }
292 scr_CheckAutoAway(FALSE); 291 scr_CheckAutoAway(FALSE);
293 292
294 hk_mainloop(); 293 hk_mainloop();
295 return TRUE; 294 return TRUE;
295 }
296
297 static gboolean mcabber_source_dispatch(GSource *source, GSourceFunc callback,
298 gpointer udata) {
299 return keyboard_activity();
296 } 300 }
297 301
298 static GSourceFuncs mcabber_source_funcs = { 302 static GSourceFuncs mcabber_source_funcs = {
299 mcabber_source_prepare, 303 mcabber_source_prepare,
300 mcabber_source_check, 304 mcabber_source_check,
447 g_source_attach(mc_source, main_context); 451 g_source_attach(mc_source, main_context);
448 452
449 scr_LogPrint(LPRINT_DEBUG, "Entering into main loop..."); 453 scr_LogPrint(LPRINT_DEBUG, "Entering into main loop...");
450 454
451 while(!terminate_ui) { 455 while(!terminate_ui) {
452 g_main_context_iteration(main_context, TRUE); 456 if (g_main_context_iteration(main_context, TRUE) == FALSE)
457 keyboard_activity();
453 if (update_roster) 458 if (update_roster)
454 scr_DrawRoster(); 459 scr_DrawRoster();
455 if(update_screen) 460 if(update_screen)
456 scr_DoUpdate(); 461 scr_DoUpdate();
457 } 462 }