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.4 by pcg, Tue Nov 25 15:25:16 2003 UTC vs.
Revision 1.5 by pcg, Tue Nov 25 15:44:38 2003 UTC

1/*--------------------------------*-C-*---------------------------------* 1/*--------------------------------*-C-*---------------------------------*
2 * File: command.c 2 * File: command.c
3 *----------------------------------------------------------------------* 3 *----------------------------------------------------------------------*
4 * $Id: command.C,v 1.4 2003/11/25 15:25:16 pcg Exp $ 4 * $Id: command.C,v 1.5 2003/11/25 15:44:38 pcg Exp $
5 * 5 *
6 * All portions of code are copyright by their respective author/s. 6 * All portions of code are copyright by their respective author/s.
7 * Copyright (c) 1992 John Bovey, University of Kent at Canterbury <jdb@ukc.ac.uk> 7 * Copyright (c) 1992 John Bovey, University of Kent at Canterbury <jdb@ukc.ac.uk>
8 * - original version 8 * - original version
9 * Copyright (c) 1994 Robert Nation <nation@rocket.sanders.lockheed.com> 9 * Copyright (c) 1994 Robert Nation <nation@rocket.sanders.lockheed.com>
663 do 663 do
664 { 664 {
665 XEvent xev; 665 XEvent xev;
666 666
667 XNextEvent (Xdisplay, &xev); 667 XNextEvent (Xdisplay, &xev);
668
668#if defined(CURSOR_BLINK) 669#if defined(CURSOR_BLINK)
669 if ((Options & Opt_cursorBlink) 670 if ((Options & Opt_cursorBlink)
670 && xev.type == KeyPress) { 671 && xev.type == KeyPress) {
671 if (hidden_cursor) { 672 if (hidden_cursor) {
672 hidden_cursor = 0; 673 hidden_cursor = 0;
673 want_refresh = 1; 674 want_refresh = 1;
674 } 675 }
675 want_keypress_time = 1; 676 blink_ev.start (NOW + BLINK_INTERVAL);
676 } 677 }
677#endif 678#endif
678 679
679#if defined(POINTER_BLANK) 680#if defined(POINTER_BLANK)
680 if ((Options & Opt_pointerBlank) 681 if ((Options & Opt_pointerBlank)
695 if (!XFilterEvent (&xev, xev.xany.window)) 696 if (!XFilterEvent (&xev, xev.xany.window))
696#endif 697#endif
697 rxvt_process_x_event (this, &xev); 698 rxvt_process_x_event (this, &xev);
698 } 699 }
699 while (XPending (Xdisplay)); 700 while (XPending (Xdisplay));
701}
702
703void
704rxvt_term::blink_cb (time_watcher &w)
705{
706 w.at += BLINK_INTERVAL;
707 hidden_cursor = !hidden_cursor;
708 want_refresh = 1;
709 flush();
700} 710}
701 711
702void 712void
703rxvt_term::x_cb (io_watcher &w, short revents) 713rxvt_term::x_cb (io_watcher &w, short revents)
704{ 714{
1405 R->want_refresh = 1; 1415 R->want_refresh = 1;
1406#ifdef USE_XIM 1416#ifdef USE_XIM
1407 if (R->Input_Context != NULL) 1417 if (R->Input_Context != NULL)
1408 XSetICFocus(R->Input_Context); 1418 XSetICFocus(R->Input_Context);
1409#endif 1419#endif
1420#ifdef CURSOR_BLINK
1421 if (R->Options & Opt_cursorBlink)
1422 R->blink_ev.start (NOW + BLINK_INTERVAL);
1423#endif
1410 } 1424 }
1411 break; 1425 break;
1412 1426
1413 case FocusOut: 1427 case FocusOut:
1414 if (R->TermWin.focus) { 1428 if (R->TermWin.focus) {
1415 R->TermWin.focus = 0; 1429 R->TermWin.focus = 0;
1416 R->want_refresh = 1; 1430 R->want_refresh = 1;
1417#ifdef USE_XIM 1431#ifdef USE_XIM
1418 if (R->Input_Context != NULL) 1432 if (R->Input_Context != NULL)
1419 XUnsetICFocus(R->Input_Context); 1433 XUnsetICFocus(R->Input_Context);
1434#endif
1435#ifdef CURSOR_BLINK
1436 if (R->Options & Opt_cursorBlink)
1437 R->blink_ev.stop ();
1438 R->hidden_cursor = 0;
1420#endif 1439#endif
1421 } 1440 }
1422 break; 1441 break;
1423 1442
1424 case ConfigureNotify: 1443 case ConfigureNotify:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines