Changes in owl.c [f7cf6c2:3aa0522]
Legend:
- Unmodified
- Added
- Removed
-
owl.c
rf7cf6c2 r3aa0522 311 311 { 312 312 owl_input j; 313 WINDOW *typwin;314 315 typwin = owl_global_get_curs_typwin(&g);316 313 317 314 while (1) { 318 j.ch = wgetch( typwin);315 j.ch = wgetch(g.input_pad); 319 316 if (j.ch == ERR) return; 320 317 … … 339 336 340 337 for (i = 1; i < bytes; i++) { 341 int tmp = wgetch(typwin);338 int tmp = wgetch(g.input_pad); 342 339 /* If what we got was not a byte, or not a continuation byte */ 343 340 if (tmp > 0xff || !(tmp & 0x80 && ~tmp & 0x40)) { … … 458 455 #endif /* OWL_STDERR_REDIR */ 459 456 460 void owl_zephyr_buddycheck_timer(owl_timer *t, void *data) 461 { 462 if (owl_global_is_pseudologins(&g)) { 463 owl_function_debugmsg("Doing zephyr buddy check"); 464 owl_function_zephyr_buddy_check(1); 465 } 457 static int owl_refresh_pre_select_action(owl_ps_action *a, void *data) 458 { 459 /* if a resize has been scheduled, deal with it */ 460 owl_global_resize(&g, 0, 0); 461 /* also handle relayouts */ 462 owl_global_relayout(&g); 463 464 /* update the terminal if we need to */ 465 if (owl_global_is_needrefresh(&g)) { 466 /* these are here in case a relayout changes the windows */ 467 WINDOW *sepwin = owl_global_get_curs_sepwin(&g); 468 WINDOW *typwin = owl_global_get_curs_typwin(&g); 469 470 /* push all changed windows to screen */ 471 update_panels(); 472 /* leave the cursor in the appropriate window */ 473 if (!owl_popwin_is_active(owl_global_get_popwin(&g)) 474 && owl_global_get_typwin(&g)) { 475 owl_function_set_cursor(typwin); 476 } else { 477 owl_function_set_cursor(sepwin); 478 } 479 doupdate(); 480 owl_global_set_noneedrefresh(&g); 481 } 482 return 0; 466 483 } 467 484 … … 469 486 int main(int argc, char **argv, char **env) 470 487 { 471 WINDOW *sepwin, *typwin;472 488 int argcsave; 473 489 const char *const *argvsave; … … 583 599 owl_function_source(NULL); 584 600 585 update_panels();586 587 601 /* Set the default style */ 588 602 owl_function_debugmsg("startup: setting startup and default style"); … … 605 619 owl_global_push_context(&g, OWL_CTX_READCONFIG|OWL_CTX_RECV, NULL, "recv"); 606 620 607 owl_select_add_timer(180, 180, owl_zephyr_buddycheck_timer, NULL, NULL); 608 609 /* If we ever deprecate the mainloop hook, remove this. */ 610 owl_select_add_timer(0, 1, owl_perlconfig_mainloop, NULL, NULL); 611 621 owl_select_add_pre_select_action(owl_refresh_pre_select_action, NULL, NULL); 612 622 owl_select_add_pre_select_action(owl_process_messages, NULL, NULL); 613 623 … … 615 625 /* main loop */ 616 626 while (1) { 617 618 /* if a resize has been scheduled, deal with it */619 owl_global_resize(&g, 0, 0);620 /* also handle relayouts */621 owl_global_relayout(&g);622 623 /* these are here in case a relayout changes the windows */624 sepwin=owl_global_get_curs_sepwin(&g);625 typwin=owl_global_get_curs_typwin(&g);626 627 /* update the terminal if we need to */628 if (owl_global_is_needrefresh(&g)) {629 /* push all changed windows to screen */630 update_panels();631 /* leave the cursor in the appropriate window */632 if (!owl_popwin_is_active(owl_global_get_popwin(&g))633 && owl_global_get_typwin(&g)) {634 owl_function_set_cursor(typwin);635 } else {636 owl_function_set_cursor(sepwin);637 }638 doupdate();639 owl_global_set_noneedrefresh(&g);640 }641 642 627 /* select on FDs we know about. */ 643 628 owl_select();
Note: See TracChangeset
for help on using the changeset viewer.