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.227 by root, Mon Jan 2 15:35:43 2006 UTC vs.
Revision 1.233 by root, Wed Jan 4 01:16:34 2006 UTC

50#include "rxvtperl.h" 50#include "rxvtperl.h"
51#include "version.h" 51#include "version.h"
52#include "command.h" 52#include "command.h"
53 53
54#if HAVE_SCHED_YIELD 54#if HAVE_SCHED_YIELD
55#undef HAVE_SCHED_YIELD // disabled for the time being
55# include <sched.h> 56//# include <sched.h>
56#endif 57#endif
57 58
58#ifdef KEYSYM_RESOURCE 59#ifdef KEYSYM_RESOURCE
59# include "keyboard.h" 60# include "keyboard.h"
60#endif 61#endif
1095{ 1096{
1096 ssize_t n = cmdbuf_endp - cmdbuf_ptr; 1097 ssize_t n = cmdbuf_endp - cmdbuf_ptr;
1097 1098
1098 if (CBUFSIZ == n) 1099 if (CBUFSIZ == n)
1099 { 1100 {
1100 rxvt_warn ("pty_fill on full buffer, draining input, continuing.\n"); 1101 rxvt_warn ("PLEASE REPORT: pty_fill on full buffer, draining input, continuing.\n");
1101 n = 0; 1102 n = 0;
1102 } 1103 }
1103 1104
1104 memmove (cmdbuf_base, cmdbuf_ptr, n); 1105 memmove (cmdbuf_base, cmdbuf_ptr, n);
1105 cmdbuf_ptr = cmdbuf_base; 1106 cmdbuf_ptr = cmdbuf_base;
1113 return true; 1114 return true;
1114 } 1115 }
1115 else if (r < 0 && (errno == EAGAIN || errno == EINTR)) 1116 else if (r < 0 && (errno == EAGAIN || errno == EINTR))
1116 { 1117 {
1117#if HAVE_SCHED_YIELD 1118#if HAVE_SCHED_YIELD
1119 if (display->is_local)
1118 event_handler.cw_yield.start (); 1120 event_handler.cw_yield.start ();
1119#endif 1121#endif
1120 } 1122 }
1121 else 1123 else
1122 { 1124 {
1123 pty_ev.stop (); 1125 pty_ev.stop ();
1794rxvt_term::button_press (XButtonEvent &ev) 1796rxvt_term::button_press (XButtonEvent &ev)
1795{ 1797{
1796 int reportmode = 0, clickintime; 1798 int reportmode = 0, clickintime;
1797 1799
1798 bypass_keystate = ev.state & (ModMetaMask | ShiftMask); 1800 bypass_keystate = ev.state & (ModMetaMask | ShiftMask);
1801
1799 if (!bypass_keystate) 1802 if (!bypass_keystate)
1800 reportmode = !! (priv_modes & PrivMode_mouse_report); 1803 reportmode = !! (priv_modes & PrivMode_mouse_report);
1801 1804
1802 /* 1805 /*
1803 * VT window processing of button press 1806 * VT window processing of button press
1852 else 1855 else
1853 { 1856 {
1854 if (ev.button != MEvent.button) 1857 if (ev.button != MEvent.button)
1855 MEvent.clicks = 0; 1858 MEvent.clicks = 0;
1856 1859
1860 if (!PERL_INVOKE ((this, HOOK_MOUSE_CLICK, DT_XEVENT, &ev, DT_END)))
1857 switch (ev.button) 1861 switch (ev.button)
1858 { 1862 {
1859 case Button1: 1863 case Button1:
1860 /* allow meta + click to select rectangular areas */ 1864 /* allow meta + click to select rectangular areas */
1861 /* should be done in screen.C */ 1865 /* should be done in screen.C */
1862#if ENABLE_FRILLS 1866#if ENABLE_FRILLS
1863 selection.rect = !!(ev.state & ModMetaMask); 1867 selection.rect = !!(ev.state & ModMetaMask);
1864#else 1868#else
1865 selection.rect = false; 1869 selection.rect = false;
1866#endif 1870#endif
1867 1871
1868 /* allow shift+left click to extend selection */ 1872 /* allow shift+left click to extend selection */
1869 if (ev.state & ShiftMask && ! (priv_modes & PrivMode_mouse_report)) 1873 if (ev.state & ShiftMask && ! (priv_modes & PrivMode_mouse_report))
1870 { 1874 {
1871 if (MEvent.button == Button1 && clickintime) 1875 if (MEvent.button == Button1 && clickintime)
1872 selection_rotate (ev.x, ev.y); 1876 selection_rotate (ev.x, ev.y);
1873 else 1877 else
1874 selection_extend (ev.x, ev.y, 1); 1878 selection_extend (ev.x, ev.y, 1);
1875 } 1879 }
1876 else 1880 else
1877 { 1881 {
1878 if (MEvent.button == Button1 && clickintime) 1882 if (MEvent.button == Button1 && clickintime)
1879 MEvent.clicks++; 1883 MEvent.clicks++;
1880 else 1884 else
1881 MEvent.clicks = 1; 1885 MEvent.clicks = 1;
1882 1886
1883 selection_click (MEvent.clicks, ev.x, ev.y); 1887 selection_click (MEvent.clicks, ev.x, ev.y);
1884 } 1888 }
1885 1889
1886 MEvent.button = Button1; 1890 MEvent.button = Button1;
1887 break; 1891 break;
1888 1892
1889 case Button3: 1893 case Button3:
1890 if (MEvent.button == Button3 && clickintime) 1894 if (MEvent.button == Button3 && clickintime)
1891 selection_rotate (ev.x, ev.y); 1895 selection_rotate (ev.x, ev.y);
1892 else 1896 else
1893 selection_extend (ev.x, ev.y, 1); 1897 selection_extend (ev.x, ev.y, 1);
1894 1898
1895 MEvent.button = Button3; 1899 MEvent.button = Button3;
1896 break; 1900 break;
1897 } 1901 }
1898 } 1902 }
1899 1903
1900 MEvent.time = ev.time; 1904 MEvent.time = ev.time;
1901 return; 1905 return;
1902 } 1906 }
1903 1907
3958 } 3962 }
3959 break; 3963 break;
3960 3964
3961 case URxvt_view_up: 3965 case URxvt_view_up:
3962 case URxvt_view_down: 3966 case URxvt_view_down:
3967 {
3963 int lines = atoi (str); 3968 int lines = atoi (str);
3964 3969
3965 if (lines) 3970 if (lines)
3966 scr_page (op == URxvt_view_up ? UP : DN, lines); 3971 scr_page (op == URxvt_view_up ? UP : DN, lines);
3967 else 3972 else
3968 {
3969 scr_erase_savelines (); 3973 scr_erase_savelines ();
3970 } 3974 }
3971 3975
3976 break;
3977#endif
3978
3979#if ENABLE_PERL
3980 case URxvt_perl:
3981 if (PERL_INVOKE ((this, HOOK_OSC_SEQ, DT_STRING, str, DT_END)))
3982 ; // no responses yet
3972 break; 3983 break;
3973#endif 3984#endif
3974 } 3985 }
3975} 3986}
3976/*----------------------------------------------------------------------*/ 3987/*----------------------------------------------------------------------*/

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines