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.228 by root, Mon Jan 2 16:08:34 2006 UTC vs.
Revision 1.229 by root, Tue Jan 3 17:34:44 2006 UTC

1795rxvt_term::button_press (XButtonEvent &ev) 1795rxvt_term::button_press (XButtonEvent &ev)
1796{ 1796{
1797 int reportmode = 0, clickintime; 1797 int reportmode = 0, clickintime;
1798 1798
1799 bypass_keystate = ev.state & (ModMetaMask | ShiftMask); 1799 bypass_keystate = ev.state & (ModMetaMask | ShiftMask);
1800
1800 if (!bypass_keystate) 1801 if (!bypass_keystate)
1801 reportmode = !! (priv_modes & PrivMode_mouse_report); 1802 reportmode = !! (priv_modes & PrivMode_mouse_report);
1802 1803
1803 /* 1804 /*
1804 * VT window processing of button press 1805 * VT window processing of button press
1853 else 1854 else
1854 { 1855 {
1855 if (ev.button != MEvent.button) 1856 if (ev.button != MEvent.button)
1856 MEvent.clicks = 0; 1857 MEvent.clicks = 0;
1857 1858
1859 if (!PERL_INVOKE ((this, HOOK_MOUSE_CLICK, DT_XEVENT, &ev, DT_END)))
1858 switch (ev.button) 1860 switch (ev.button)
1859 { 1861 {
1860 case Button1: 1862 case Button1:
1861 /* allow meta + click to select rectangular areas */ 1863 /* allow meta + click to select rectangular areas */
1862 /* should be done in screen.C */ 1864 /* should be done in screen.C */
1863#if ENABLE_FRILLS 1865#if ENABLE_FRILLS
1864 selection.rect = !!(ev.state & ModMetaMask); 1866 selection.rect = !!(ev.state & ModMetaMask);
1865#else 1867#else
1866 selection.rect = false; 1868 selection.rect = false;
1867#endif 1869#endif
1868 1870
1869 /* allow shift+left click to extend selection */ 1871 /* allow shift+left click to extend selection */
1870 if (ev.state & ShiftMask && ! (priv_modes & PrivMode_mouse_report)) 1872 if (ev.state & ShiftMask && ! (priv_modes & PrivMode_mouse_report))
1871 { 1873 {
1872 if (MEvent.button == Button1 && clickintime) 1874 if (MEvent.button == Button1 && clickintime)
1873 selection_rotate (ev.x, ev.y); 1875 selection_rotate (ev.x, ev.y);
1874 else 1876 else
1875 selection_extend (ev.x, ev.y, 1); 1877 selection_extend (ev.x, ev.y, 1);
1876 } 1878 }
1877 else 1879 else
1878 { 1880 {
1879 if (MEvent.button == Button1 && clickintime) 1881 if (MEvent.button == Button1 && clickintime)
1880 MEvent.clicks++; 1882 MEvent.clicks++;
1881 else 1883 else
1882 MEvent.clicks = 1; 1884 MEvent.clicks = 1;
1883 1885
1884 selection_click (MEvent.clicks, ev.x, ev.y); 1886 selection_click (MEvent.clicks, ev.x, ev.y);
1885 } 1887 }
1886 1888
1887 MEvent.button = Button1; 1889 MEvent.button = Button1;
1888 break; 1890 break;
1889 1891
1890 case Button3: 1892 case Button3:
1891 if (MEvent.button == Button3 && clickintime) 1893 if (MEvent.button == Button3 && clickintime)
1892 selection_rotate (ev.x, ev.y); 1894 selection_rotate (ev.x, ev.y);
1893 else 1895 else
1894 selection_extend (ev.x, ev.y, 1); 1896 selection_extend (ev.x, ev.y, 1);
1895 1897
1896 MEvent.button = Button3; 1898 MEvent.button = Button3;
1897 break; 1899 break;
1898 } 1900 }
1899 } 1901 }
1900 1902
1901 MEvent.time = ev.time; 1903 MEvent.time = ev.time;
1902 return; 1904 return;
1903 } 1905 }
1904 1906

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines