… | |
… | |
1048 | { |
1048 | { |
1049 | make_current (); |
1049 | make_current (); |
1050 | |
1050 | |
1051 | display->flush (); |
1051 | display->flush (); |
1052 | |
1052 | |
1053 | if (want_refresh && !flush_ev.active) |
1053 | if (want_refresh && !ev_is_active (&flush_ev)) |
1054 | flush_ev.start (1. / 60.); // refresh at max. 60 Hz normally |
1054 | flush_ev.again (); |
1055 | } |
1055 | } |
1056 | |
1056 | |
1057 | void |
1057 | void |
1058 | rxvt_term::flush_cb (ev::timer &w, int revents) |
1058 | rxvt_term::flush_cb (ev::timer &w, int revents) |
1059 | { |
1059 | { |
… | |
… | |
1476 | break; |
1476 | break; |
1477 | |
1477 | |
1478 | case MapNotify: |
1478 | case MapNotify: |
1479 | mapped = 1; |
1479 | mapped = 1; |
1480 | #ifdef TEXT_BLINK |
1480 | #ifdef TEXT_BLINK |
1481 | text_blink_ev.start (TEXT_BLINK_INTERVAL); |
1481 | text_blink_ev.again (); |
1482 | #endif |
1482 | #endif |
1483 | HOOK_INVOKE ((this, HOOK_MAP_NOTIFY, DT_XEVENT, &ev, DT_END)); |
1483 | HOOK_INVOKE ((this, HOOK_MAP_NOTIFY, DT_XEVENT, &ev, DT_END)); |
1484 | break; |
1484 | break; |
1485 | |
1485 | |
1486 | case UnmapNotify: |
1486 | case UnmapNotify: |
… | |
… | |
1577 | int dist; |
1577 | int dist; |
1578 | |
1578 | |
1579 | /* don't clobber the current delay if we are |
1579 | /* don't clobber the current delay if we are |
1580 | * already in the middle of scrolling. |
1580 | * already in the middle of scrolling. |
1581 | */ |
1581 | */ |
1582 | if (!sel_scroll_ev.active) |
1582 | if (!ev_is_active (&sel_scroll_ev)) |
1583 | sel_scroll_ev.start (SCROLLBAR_INITIAL_DELAY, SCROLLBAR_CONTINUOUS_DELAY); |
1583 | sel_scroll_ev.start (SCROLLBAR_INITIAL_DELAY, SCROLLBAR_CONTINUOUS_DELAY); |
1584 | |
1584 | |
1585 | /* save the event params so we can highlight |
1585 | /* save the event params so we can highlight |
1586 | * the selection in the pending-scroll loop |
1586 | * the selection in the pending-scroll loop |
1587 | */ |
1587 | */ |
… | |
… | |
1610 | else |
1610 | else |
1611 | { |
1611 | { |
1612 | /* we are within the text window, so we |
1612 | /* we are within the text window, so we |
1613 | * shouldn't be scrolling |
1613 | * shouldn't be scrolling |
1614 | */ |
1614 | */ |
1615 | if (sel_scroll_ev.active) |
1615 | if (ev_is_active (&sel_scroll_ev)) |
1616 | sel_scroll_ev.stop(); |
1616 | sel_scroll_ev.stop(); |
1617 | } |
1617 | } |
1618 | #endif |
1618 | #endif |
1619 | #ifdef MOUSE_THRESHOLD |
1619 | #ifdef MOUSE_THRESHOLD |
1620 | } |
1620 | } |
… | |
… | |
1957 | } |
1957 | } |
1958 | else |
1958 | else |
1959 | #endif /* NO_SCROLLBAR_REPORT */ |
1959 | #endif /* NO_SCROLLBAR_REPORT */ |
1960 | |
1960 | |
1961 | { |
1961 | { |
1962 | char upordown = 0; |
1962 | char upordown = 0; |
1963 | |
1963 | |
1964 | if (scrollBar.style == R_SB_NEXT) |
1964 | if (scrollBar.style == R_SB_NEXT) |
1965 | { |
1965 | { |
1966 | if (scrollbarnext_upButton (ev.y)) |
1966 | if (scrollbarnext_upButton (ev.y)) |
1967 | upordown = -1; /* up */ |
1967 | upordown = -1; /* up */ |
… | |
… | |
2066 | scrollBar.setIdle (); |
2066 | scrollBar.setIdle (); |
2067 | scrollbar_show (0); |
2067 | scrollbar_show (0); |
2068 | } |
2068 | } |
2069 | |
2069 | |
2070 | #ifdef SELECTION_SCROLLING |
2070 | #ifdef SELECTION_SCROLLING |
2071 | if (sel_scroll_ev.active) |
2071 | if (ev_is_active (&sel_scroll_ev)) |
2072 | sel_scroll_ev.stop(); |
2072 | sel_scroll_ev.stop(); |
2073 | #endif |
2073 | #endif |
2074 | |
2074 | |
2075 | if (ev.window == vt) |
2075 | if (ev.window == vt) |
2076 | { |
2076 | { |
… | |
… | |
3582 | { 66, PrivMode_aplKP }, |
3582 | { 66, PrivMode_aplKP }, |
3583 | #ifndef NO_BACKSPACE_KEY |
3583 | #ifndef NO_BACKSPACE_KEY |
3584 | { 67, PrivMode_BackSpace }, |
3584 | { 67, PrivMode_BackSpace }, |
3585 | #endif |
3585 | #endif |
3586 | { 1000, PrivMode_MouseX11 }, |
3586 | { 1000, PrivMode_MouseX11 }, |
3587 | // 1001 Use Hilite Mouse Tracking. NYI, TODO |
|
|
3588 | { 1002, PrivMode_MouseBtnEvent }, |
3587 | { 1002, PrivMode_MouseBtnEvent }, |
3589 | { 1003, PrivMode_MouseAnyEvent }, |
3588 | { 1003, PrivMode_MouseAnyEvent }, |
3590 | { 1010, PrivMode_TtyOutputInh }, // rxvt extension |
3589 | { 1010, PrivMode_TtyOutputInh }, // rxvt extension |
3591 | { 1011, PrivMode_Keypress }, // rxvt extension |
3590 | { 1011, PrivMode_Keypress }, // rxvt extension |
3592 | // 1035 enable modifiers for alt, numlock NYI |
3591 | // 1035 enable modifiers for alt, numlock NYI |
… | |
… | |
3693 | /* case 67: - backspace key */ |
3692 | /* case 67: - backspace key */ |
3694 | case 1000: /* X11 mouse reporting */ |
3693 | case 1000: /* X11 mouse reporting */ |
3695 | if (state) /* orthogonal */ |
3694 | if (state) /* orthogonal */ |
3696 | priv_modes &= ~(PrivMode_MouseX10|PrivMode_MouseBtnEvent|PrivMode_MouseAnyEvent); |
3695 | priv_modes &= ~(PrivMode_MouseX10|PrivMode_MouseBtnEvent|PrivMode_MouseAnyEvent); |
3697 | break; |
3696 | break; |
3698 | #if 0 |
|
|
3699 | case 1001: |
|
|
3700 | break; /* X11 mouse highlighting */ |
|
|
3701 | #endif |
|
|
3702 | case 1002: |
3697 | case 1002: |
3703 | case 1003: |
3698 | case 1003: |
3704 | if (state) |
3699 | if (state) |
3705 | { |
3700 | { |
3706 | priv_modes &= ~(PrivMode_MouseX10|PrivMode_MouseX11); |
3701 | priv_modes &= ~(PrivMode_MouseX10|PrivMode_MouseX11); |