1 | /*--------------------------------*-C-*---------------------------------* |
1 | /*--------------------------------*-C-*---------------------------------* |
2 | * File: command.c |
2 | * File: command.c |
3 | *----------------------------------------------------------------------* |
3 | *----------------------------------------------------------------------* |
4 | * $Id: command.C,v 1.25 2003/12/19 09:41:09 pcg Exp $ |
4 | * $Id: command.C,v 1.28 2004/01/16 22:11:09 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> |
… | |
… | |
752 | rxvt_process_x_event (this, &xev); |
752 | rxvt_process_x_event (this, &xev); |
753 | } |
753 | } |
754 | while (XPending (Xdisplay)); |
754 | while (XPending (Xdisplay)); |
755 | } |
755 | } |
756 | |
756 | |
|
|
757 | #ifdef CURSOR_BLINK |
757 | void |
758 | void |
758 | rxvt_term::blink_cb (time_watcher &w) |
759 | rxvt_term::blink_cb (time_watcher &w) |
759 | { |
760 | { |
760 | w.at += BLINK_INTERVAL; |
|
|
761 | hidden_cursor = !hidden_cursor; |
761 | hidden_cursor = !hidden_cursor; |
762 | want_refresh = 1; |
762 | want_refresh = 1; |
|
|
763 | |
|
|
764 | w.start (w.at + BLINK_INTERVAL); |
763 | } |
765 | } |
|
|
766 | #endif |
764 | |
767 | |
765 | void |
768 | void |
766 | rxvt_term::x_cb (io_watcher &w, short revents) |
769 | rxvt_term::x_cb (io_watcher &w, short revents) |
767 | { |
770 | { |
768 | SET_R (this); |
771 | SET_R (this); |
… | |
… | |
1035 | |
1038 | |
1036 | #ifdef POINTER_BLANK |
1039 | #ifdef POINTER_BLANK |
1037 | void |
1040 | void |
1038 | rxvt_term::pointer_blank () |
1041 | rxvt_term::pointer_blank () |
1039 | { |
1042 | { |
1040 | pointer_ev.stop (); |
|
|
1041 | |
|
|
1042 | if (!(Options & Opt_pointerBlank)) |
1043 | if (!(Options & Opt_pointerBlank)) |
1043 | return; |
1044 | return; |
1044 | |
1045 | |
1045 | XDefineCursor (Xdisplay, TermWin.vt, blank_cursor); |
1046 | XDefineCursor (Xdisplay, TermWin.vt, blank_cursor); |
1046 | XFlush (Xdisplay); |
1047 | XFlush (Xdisplay); |
… | |
… | |
1526 | |
1527 | |
1527 | /* INTPROTO */ |
1528 | /* INTPROTO */ |
1528 | void |
1529 | void |
1529 | rxvt_button_press(pR_ XButtonEvent *ev) |
1530 | rxvt_button_press(pR_ XButtonEvent *ev) |
1530 | { |
1531 | { |
1531 | int reportmode = 0, clickintime; |
1532 | int reportmode = 0, clickintime; |
1532 | |
1533 | |
1533 | R->bypass_keystate = ev->state & (R->ModMetaMask | ShiftMask); |
1534 | R->bypass_keystate = ev->state & (R->ModMetaMask | ShiftMask); |
1534 | if (!R->bypass_keystate) |
1535 | if (!R->bypass_keystate) |
1535 | reportmode = !!(R->PrivateModes & PrivMode_mouse_report); |
1536 | reportmode = !!(R->PrivateModes & PrivMode_mouse_report); |
1536 | /* |
1537 | /* |
… | |
… | |
1584 | R->MEvent.clicks = 0; |
1585 | R->MEvent.clicks = 0; |
1585 | switch (ev->button) |
1586 | switch (ev->button) |
1586 | { |
1587 | { |
1587 | case Button1: |
1588 | case Button1: |
1588 | /* allow shift+left click to extend selection */ |
1589 | /* allow shift+left click to extend selection */ |
1589 | if (ev->state & ShiftMask) |
1590 | if (ev->state & ShiftMask && !(R->PrivateModes & PrivMode_mouse_report)) |
1590 | { |
1591 | { |
1591 | if (R->MEvent.button == Button1 && clickintime) |
1592 | if (R->MEvent.button == Button1 && clickintime) |
1592 | R->selection_rotate (ev->x, ev->y); |
1593 | R->selection_rotate (ev->x, ev->y); |
1593 | else |
1594 | else |
1594 | R->selection_extend (ev->x, ev->y, 1); |
1595 | R->selection_extend (ev->x, ev->y, 1); |