… | |
… | |
1113 | return true; |
1113 | return true; |
1114 | } |
1114 | } |
1115 | else if (r < 0 && (errno == EAGAIN || errno == EINTR)) |
1115 | else if (r < 0 && (errno == EAGAIN || errno == EINTR)) |
1116 | { |
1116 | { |
1117 | #if HAVE_SCHED_YIELD |
1117 | #if HAVE_SCHED_YIELD |
|
|
1118 | if (display->is_local) |
1118 | event_handler.cw_yield.start (); |
1119 | event_handler.cw_yield.start (); |
1119 | #endif |
1120 | #endif |
1120 | } |
1121 | } |
1121 | else |
1122 | else |
1122 | { |
1123 | { |
1123 | pty_ev.stop (); |
1124 | pty_ev.stop (); |
… | |
… | |
1794 | rxvt_term::button_press (XButtonEvent &ev) |
1795 | rxvt_term::button_press (XButtonEvent &ev) |
1795 | { |
1796 | { |
1796 | int reportmode = 0, clickintime; |
1797 | int reportmode = 0, clickintime; |
1797 | |
1798 | |
1798 | bypass_keystate = ev.state & (ModMetaMask | ShiftMask); |
1799 | bypass_keystate = ev.state & (ModMetaMask | ShiftMask); |
|
|
1800 | |
1799 | if (!bypass_keystate) |
1801 | if (!bypass_keystate) |
1800 | reportmode = !! (priv_modes & PrivMode_mouse_report); |
1802 | reportmode = !! (priv_modes & PrivMode_mouse_report); |
1801 | |
1803 | |
1802 | /* |
1804 | /* |
1803 | * VT window processing of button press |
1805 | * VT window processing of button press |
… | |
… | |
1852 | else |
1854 | else |
1853 | { |
1855 | { |
1854 | if (ev.button != MEvent.button) |
1856 | if (ev.button != MEvent.button) |
1855 | MEvent.clicks = 0; |
1857 | MEvent.clicks = 0; |
1856 | |
1858 | |
|
|
1859 | if (!PERL_INVOKE ((this, HOOK_MOUSE_CLICK, DT_XEVENT, &ev, DT_END))) |
1857 | switch (ev.button) |
1860 | switch (ev.button) |
1858 | { |
1861 | { |
1859 | case Button1: |
1862 | case Button1: |
1860 | /* allow meta + click to select rectangular areas */ |
1863 | /* allow meta + click to select rectangular areas */ |
1861 | /* should be done in screen.C */ |
1864 | /* should be done in screen.C */ |
1862 | #if ENABLE_FRILLS |
1865 | #if ENABLE_FRILLS |
1863 | selection.rect = !!(ev.state & ModMetaMask); |
1866 | selection.rect = !!(ev.state & ModMetaMask); |
1864 | #else |
1867 | #else |
1865 | selection.rect = false; |
1868 | selection.rect = false; |
1866 | #endif |
1869 | #endif |
1867 | |
1870 | |
1868 | /* allow shift+left click to extend selection */ |
1871 | /* allow shift+left click to extend selection */ |
1869 | if (ev.state & ShiftMask && ! (priv_modes & PrivMode_mouse_report)) |
1872 | if (ev.state & ShiftMask && ! (priv_modes & PrivMode_mouse_report)) |
1870 | { |
1873 | { |
1871 | if (MEvent.button == Button1 && clickintime) |
1874 | if (MEvent.button == Button1 && clickintime) |
1872 | selection_rotate (ev.x, ev.y); |
1875 | selection_rotate (ev.x, ev.y); |
1873 | else |
1876 | else |
1874 | selection_extend (ev.x, ev.y, 1); |
1877 | selection_extend (ev.x, ev.y, 1); |
1875 | } |
1878 | } |
1876 | else |
1879 | else |
1877 | { |
1880 | { |
1878 | if (MEvent.button == Button1 && clickintime) |
1881 | if (MEvent.button == Button1 && clickintime) |
1879 | MEvent.clicks++; |
1882 | MEvent.clicks++; |
1880 | else |
1883 | else |
1881 | MEvent.clicks = 1; |
1884 | MEvent.clicks = 1; |
1882 | |
1885 | |
1883 | selection_click (MEvent.clicks, ev.x, ev.y); |
1886 | selection_click (MEvent.clicks, ev.x, ev.y); |
1884 | } |
1887 | } |
1885 | |
1888 | |
1886 | MEvent.button = Button1; |
1889 | MEvent.button = Button1; |
1887 | break; |
1890 | break; |
1888 | |
1891 | |
1889 | case Button3: |
1892 | case Button3: |
1890 | if (MEvent.button == Button3 && clickintime) |
1893 | if (MEvent.button == Button3 && clickintime) |
1891 | selection_rotate (ev.x, ev.y); |
1894 | selection_rotate (ev.x, ev.y); |
1892 | else |
1895 | else |
1893 | selection_extend (ev.x, ev.y, 1); |
1896 | selection_extend (ev.x, ev.y, 1); |
1894 | |
1897 | |
1895 | MEvent.button = Button3; |
1898 | MEvent.button = Button3; |
1896 | break; |
1899 | break; |
1897 | } |
1900 | } |
1898 | } |
1901 | } |
1899 | |
1902 | |
1900 | MEvent.time = ev.time; |
1903 | MEvent.time = ev.time; |
1901 | return; |
1904 | return; |
1902 | } |
1905 | } |
1903 | |
1906 | |
… | |
… | |
3958 | } |
3961 | } |
3959 | break; |
3962 | break; |
3960 | |
3963 | |
3961 | case URxvt_view_up: |
3964 | case URxvt_view_up: |
3962 | case URxvt_view_down: |
3965 | case URxvt_view_down: |
|
|
3966 | { |
3963 | int lines = atoi (str); |
3967 | int lines = atoi (str); |
3964 | |
3968 | |
3965 | if (lines) |
3969 | if (lines) |
3966 | scr_page (op == URxvt_view_up ? UP : DN, lines); |
3970 | scr_page (op == URxvt_view_up ? UP : DN, lines); |
3967 | else |
3971 | else |
3968 | { |
|
|
3969 | scr_erase_savelines (); |
3972 | scr_erase_savelines (); |
3970 | } |
3973 | } |
3971 | |
3974 | |
|
|
3975 | break; |
|
|
3976 | #endif |
|
|
3977 | |
|
|
3978 | #if ENABLE_PERL |
|
|
3979 | case URxvt_perl: |
|
|
3980 | if (PERL_INVOKE ((this, HOOK_OSC_SEQ, DT_STRING, str, DT_END))) |
|
|
3981 | ; // no responses yet |
3972 | break; |
3982 | break; |
3973 | #endif |
3983 | #endif |
3974 | } |
3984 | } |
3975 | } |
3985 | } |
3976 | /*----------------------------------------------------------------------*/ |
3986 | /*----------------------------------------------------------------------*/ |