ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/command.C
(Generate patch)

Comparing rxvt-unicode/src/command.C (file contents):
Revision 1.328 by ayin, Mon Jun 11 17:40:15 2007 UTC vs.
Revision 1.330 by root, Mon Jun 18 12:53:25 2007 UTC

536 scr_overlay_new (0, -1, sizeof ("ISO 14755 mode") - 1, 1); 536 scr_overlay_new (0, -1, sizeof ("ISO 14755 mode") - 1, 1);
537 scr_overlay_set (0, 0, "ISO 14755 mode"); 537 scr_overlay_set (0, 0, "ISO 14755 mode");
538# endif 538# endif
539 } 539 }
540#endif 540#endif
541 541
542#ifdef PRINTPIPE 542#ifdef PRINTPIPE
543 if (keysym == XK_Print) 543 if (keysym == XK_Print)
544 { 544 {
545 scr_printscreen (ctrl | shft); 545 scr_printscreen (ctrl | shft);
546 return; 546 return;
1110void 1110void
1111rxvt_term::flush_cb (time_watcher &w) 1111rxvt_term::flush_cb (time_watcher &w)
1112{ 1112{
1113 make_current (); 1113 make_current ();
1114 1114
1115 refresh_limit = 1;
1116 refresh_count = 0; 1115 refresh_count = 0;
1117 flush (); 1116 flush ();
1118} 1117}
1119 1118
1120#ifdef CURSOR_BLINK 1119#ifdef CURSOR_BLINK
1186 1185
1187#if LINUX_YIELD_HACK 1186#if LINUX_YIELD_HACK
1188static struct event_handler 1187static struct event_handler
1189{ 1188{
1190 check_watcher yield_ev; 1189 check_watcher yield_ev;
1191 1190
1192 void yield_cb (check_watcher &w) 1191 void yield_cb (check_watcher &w)
1193 { 1192 {
1194 // this should really be sched_yield(), but the linux guys thought 1193 // this should really be sched_yield(), but the linux guys thought
1195 // that giving a process calling sched_yield () less cpu time than 1194 // that giving a process calling sched_yield () less cpu time than
1196 // ones with high nice levels is a useful thing to do. It surely is is 1195 // ones with high nice levels is a useful thing to do. It surely is is
1243 pty_ev.stop (); 1242 pty_ev.stop ();
1244 1243
1245 if (!option (Opt_hold)) 1244 if (!option (Opt_hold))
1246 destroy (); 1245 destroy ();
1247 } 1246 }
1248 1247
1249 return false; 1248 return false;
1250} 1249}
1251 1250
1252void 1251void
1253rxvt_term::pty_cb (io_watcher &w, short revents) 1252rxvt_term::pty_cb (io_watcher &w, short revents)
1490 if (szHint.width != ev.xconfigure.width || szHint.height != ev.xconfigure.height) 1489 if (szHint.width != ev.xconfigure.width || szHint.height != ev.xconfigure.height)
1491 { 1490 {
1492 seen_resize = 1; 1491 seen_resize = 1;
1493 resize_all_windows (ev.xconfigure.width, ev.xconfigure.height, 1); 1492 resize_all_windows (ev.xconfigure.width, ev.xconfigure.height, 1);
1494#ifdef XPM_BACKGROUND 1493#ifdef XPM_BACKGROUND
1495 if (!option(Opt_transparent) && bgPixmap.auto_resize) 1494 if (!option (Opt_transparent) && bgPixmap.auto_resize)
1496 { 1495 {
1497 resize_pixmap (); 1496 resize_pixmap ();
1498 scr_touch (true); 1497 scr_touch (true);
1499 } 1498 }
1500#endif 1499#endif
1501 } 1500 }
1502 1501
1503 HOOK_INVOKE ((this, HOOK_CONFIGURE_NOTIFY, DT_XEVENT, &ev, DT_END)); 1502 HOOK_INVOKE ((this, HOOK_CONFIGURE_NOTIFY, DT_XEVENT, &ev, DT_END));
1504 1503
1693 &ev.xbutton.x, &ev.xbutton.y, 1692 &ev.xbutton.x, &ev.xbutton.y,
1694 &unused_mask); 1693 &unused_mask);
1695 scr_move_to (scrollbar_position (ev.xbutton.y) - csrO, 1694 scr_move_to (scrollbar_position (ev.xbutton.y) - csrO,
1696 scrollbar_size ()); 1695 scrollbar_size ());
1697 want_refresh = 1; 1696 want_refresh = 1;
1698 refresh_limit = 0;
1699 scrollbar_show (1); 1697 scrollbar_show (1);
1700 } 1698 }
1701 break; 1699 break;
1702 } 1700 }
1703 1701
2291 if (ch == C0_LF) 2289 if (ch == C0_LF)
2292 nlines++; 2290 nlines++;
2293 2291
2294 refresh_count++; 2292 refresh_count++;
2295 2293
2296 if (!option (Opt_jumpScroll) 2294 if (!option (Opt_jumpScroll) || refresh_count >= nrow - 1)
2297 || (refresh_count >= refresh_limit * (nrow - 1)))
2298 { 2295 {
2299 refreshnow = true;
2300 refresh_count = 0; 2296 refresh_count = 0;
2297
2298 if (!option (Opt_skipScroll) || io_manager::now () > NOW + .1)
2299 {
2300 refreshnow = true;
2301 ch = NOCHAR; 2301 ch = NOCHAR;
2302 break; 2302 break;
2303 }
2303 } 2304 }
2304 2305
2305 // scr_add_lines only works for nlines <= nrow - 1. 2306 // scr_add_lines only works for nlines <= nrow - 1.
2306 if (nlines >= nrow - 1) 2307 if (nlines >= nrow - 1)
2307 { 2308 {
2335 && HOOK_INVOKE ((this, HOOK_ADD_LINES, DT_WCS_LEN, buf, str - buf, DT_END)))) 2336 && HOOK_INVOKE ((this, HOOK_ADD_LINES, DT_WCS_LEN, buf, str - buf, DT_END))))
2336 scr_add_lines (buf, str - buf, nlines); 2337 scr_add_lines (buf, str - buf, nlines);
2337 2338
2338 /* 2339 /*
2339 * If there have been a lot of new lines, then update the screen 2340 * If there have been a lot of new lines, then update the screen
2340 * What the heck I'll cheat and only refresh less than every page-full. 2341 * What the heck we'll cheat and only refresh less than every page-full.
2341 * the number of pages between refreshes is refresh_limit, which 2342 * if skipScroll is enabled.
2342 * is incremented here because we must be doing flat-out scrolling.
2343 */ 2343 */
2344 if (refreshnow) 2344 if (refreshnow)
2345 { 2345 {
2346 if (option (Opt_jumpScroll) && refresh_limit < REFRESH_PERIOD)
2347 refresh_limit++;
2348 else
2349 {
2350 flag = true; 2346 flag = true;
2351 //TODO: due to popular request, implement "skipscroll" option here
2352 scr_refresh (); 2347 scr_refresh ();
2353 want_refresh = 1; 2348 want_refresh = 1;
2354 }
2355 } 2349 }
2356 2350
2357 } 2351 }
2358 else 2352 else
2359 { 2353 {
2508 { 2502 {
2509 if ((buf[len++] = cmd_getc ()) == 'i') 2503 if ((buf[len++] = cmd_getc ()) == 'i')
2510 break; /* done = 1 */ 2504 break; /* done = 1 */
2511 } 2505 }
2512 } 2506 }
2513 2507
2514 for (i = 0; i < len; i++) 2508 for (i = 0; i < len; i++)
2515 if (putc (buf[i], fd) == EOF) 2509 if (putc (buf[i], fd) == EOF)
2516 { 2510 {
2517 done = 1; 2511 done = 1;
2518 break; 2512 break;
3336 int saveop = op; 3330 int saveop = op;
3337 3331
3338 dLocal (Display *, dpy); 3332 dLocal (Display *, dpy);
3339 3333
3340 assert (str != NULL); 3334 assert (str != NULL);
3341 3335
3342 if (HOOK_INVOKE ((this, HOOK_OSC_SEQ, DT_INT, op, DT_STR, str, DT_END))) 3336 if (HOOK_INVOKE ((this, HOOK_OSC_SEQ, DT_INT, op, DT_STR, str, DT_END)))
3343 return; 3337 return;
3344 3338
3345 switch (op) 3339 switch (op)
3346 { 3340 {
3482 resize_pixmap (); 3476 resize_pixmap ();
3483 scr_touch (true); 3477 scr_touch (true);
3484#endif 3478#endif
3485 } 3479 }
3486#if TRANSPARENT && defined(HAVE_AFTERIMAGE) 3480#if TRANSPARENT && defined(HAVE_AFTERIMAGE)
3487 if (option(Opt_transparent)) 3481 if (option (Opt_transparent))
3488 check_our_parents (); 3482 check_our_parents ();
3489#endif 3483#endif
3490
3491 } 3484 }
3492 break; 3485 break;
3493 3486
3494 case Rxvt_restoreFG: 3487 case Rxvt_restoreFG:
3495 set_window_color (Color_fg, str); 3488 set_window_color (Color_fg, str);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines