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.277 by root, Fri Jan 20 12:16:28 2006 UTC vs.
Revision 1.281 by root, Tue Jan 24 17:28:06 2006 UTC

1492#endif 1492#endif
1493 } 1493 }
1494 break; 1494 break;
1495 1495
1496 case PropertyNotify: 1496 case PropertyNotify:
1497 if (!HOOK_INVOKE ((this, HOOK_PROPERTY_NOTIFY, DT_XEVENT, &ev, DT_END)))
1497 if (ev.xproperty.atom == xa[XA_VT_SELECTION] 1498 if (ev.xproperty.atom == xa[XA_VT_SELECTION]
1498 && ev.xproperty.state == PropertyNewValue) 1499 && ev.xproperty.state == PropertyNewValue)
1499 selection_property (ev.xproperty.window, ev.xproperty.atom); 1500 selection_property (ev.xproperty.window, ev.xproperty.atom);
1500 1501
1501 break; 1502 break;
1502 1503
1503 case SelectionClear: 1504 case SelectionClear:
1504 selection_clear (); 1505 selection_clear ();
1822 /* 1823 /*
1823 * VT window processing of button press 1824 * VT window processing of button press
1824 */ 1825 */
1825 if (ev.window == vt) 1826 if (ev.window == vt)
1826 { 1827 {
1828 if (HOOK_INVOKE ((this, HOOK_BUTTON_PRESS, DT_XEVENT, &ev, DT_END)))
1829 return;
1830
1827#if ISO_14755 1831#if ISO_14755
1828 // 5.4 1832 // 5.4
1829 if (iso14755buf & (ISO_14755_STARTED | ISO_14755_54)) 1833 if (iso14755buf & (ISO_14755_STARTED | ISO_14755_54))
1830 { 1834 {
1831 iso14755_54 (ev.x, ev.y); 1835 iso14755_54 (ev.x, ev.y);
1873 else 1877 else
1874 { 1878 {
1875 if (ev.button != MEvent.button) 1879 if (ev.button != MEvent.button)
1876 MEvent.clicks = 0; 1880 MEvent.clicks = 0;
1877 1881
1878 if (!HOOK_INVOKE ((this, HOOK_BUTTON_PRESS, DT_XEVENT, &ev, DT_END)))
1879 switch (ev.button) 1882 switch (ev.button)
1880 { 1883 {
1881 case Button1: 1884 case Button1:
1882 /* allow meta + click to select rectangular areas */ 1885 /* allow meta + click to select rectangular areas */
1883 /* should be done in screen.C */ 1886 /* should be done in screen.C */
1884#if ENABLE_FRILLS 1887#if ENABLE_FRILLS
1885 selection.rect = !!(ev.state & ModMetaMask); 1888 selection.rect = !!(ev.state & ModMetaMask);
1886#else 1889#else
1887 selection.rect = false; 1890 selection.rect = false;
1888#endif 1891#endif
1889 1892
1890 /* allow shift+left click to extend selection */ 1893 /* allow shift+left click to extend selection */
1891 if (ev.state & ShiftMask && !(priv_modes & PrivMode_mouse_report)) 1894 if (ev.state & ShiftMask && !(priv_modes & PrivMode_mouse_report))
1892 { 1895 {
1893 if (MEvent.button == Button1 && clickintime) 1896 if (MEvent.button == Button1 && clickintime)
1894 selection_rotate (ev.x, ev.y); 1897 selection_rotate (ev.x, ev.y);
1895 else 1898 else
1896 selection_extend (ev.x, ev.y, 1); 1899 selection_extend (ev.x, ev.y, 1);
1897 } 1900 }
1898 else 1901 else
1899 { 1902 {
1900 if (MEvent.button == Button1 && clickintime) 1903 if (MEvent.button == Button1 && clickintime)
1901 MEvent.clicks++; 1904 MEvent.clicks++;
1902 else 1905 else
1903 MEvent.clicks = 1; 1906 MEvent.clicks = 1;
1904 1907
1905 selection_click (MEvent.clicks, ev.x, ev.y); 1908 selection_click (MEvent.clicks, ev.x, ev.y);
1906 } 1909 }
1907 1910
1908 MEvent.button = Button1; 1911 MEvent.button = Button1;
1909 break; 1912 break;
1910 1913
1911 case Button3: 1914 case Button3:
1912 if (MEvent.button == Button3 && clickintime) 1915 if (MEvent.button == Button3 && clickintime)
1913 selection_rotate (ev.x, ev.y); 1916 selection_rotate (ev.x, ev.y);
1914 else 1917 else
1915 selection_extend (ev.x, ev.y, 1); 1918 selection_extend (ev.x, ev.y, 1);
1916 1919
1917 MEvent.button = Button3; 1920 MEvent.button = Button3;
1918 break; 1921 break;
1919 } 1922 }
1920 } 1923 }
1921 1924
1922 MEvent.time = ev.time; 1925 MEvent.time = ev.time;
1923 return; 1926 return;
1924 } 1927 }
1925 1928
2088 sel_scroll_ev.stop(); 2091 sel_scroll_ev.stop();
2089#endif 2092#endif
2090 2093
2091 if (ev.window == vt) 2094 if (ev.window == vt)
2092 { 2095 {
2096 if (HOOK_INVOKE ((this, HOOK_BUTTON_RELEASE, DT_XEVENT, &ev, DT_END)))
2097 return;
2098
2093#if ISO_14755 2099#if ISO_14755
2094 // 5.4 2100 // 5.4
2095 if (iso14755buf & (ISO_14755_STARTED | ISO_14755_54)) 2101 if (iso14755buf & (ISO_14755_STARTED | ISO_14755_54))
2096 return; 2102 return;
2097#endif 2103#endif
2104
2098 if (reportmode) 2105 if (reportmode)
2099 { 2106 {
2100 /* mouse report from vt window */ 2107 /* mouse report from vt window */
2101 /* don't report release of wheel "buttons" */ 2108 /* don't report release of wheel "buttons" */
2102 if (ev.button >= 4) 2109 if (ev.button >= 4)
2126 if (priv_modes & PrivMode_mouse_report 2133 if (priv_modes & PrivMode_mouse_report
2127 && bypass_keystate 2134 && bypass_keystate
2128 && ev.button == Button1 && MEvent.clicks <= 1) 2135 && ev.button == Button1 && MEvent.clicks <= 1)
2129 selection_extend (ev.x, ev.y, 0); 2136 selection_extend (ev.x, ev.y, 0);
2130 2137
2131 if (HOOK_INVOKE ((this, HOOK_BUTTON_RELEASE, DT_XEVENT, &ev, DT_END)))
2132 return;
2133
2134 switch (ev.button) 2138 switch (ev.button)
2135 { 2139 {
2136 case Button1: 2140 case Button1:
2137 case Button3: 2141 case Button3:
2138 selection_make (ev.time); 2142 selection_make (ev.time);
2139 break; 2143 break;
2140 2144
2141 case Button2: 2145 case Button2:
2142 if (IN_RANGE_EXC (ev.x, 0, width) && IN_RANGE_EXC (ev.y, 0, height)) // inside window? 2146 if (IN_RANGE_EXC (ev.x, 0, width) && IN_RANGE_EXC (ev.y, 0, height)) // inside window?
2143 selection_request (ev.time, ev.state & ShiftMask ? Sel_Clipboard : Sel_Primary); 2147 selection_request (ev.time, ev.state & ModMetaMask ? Sel_Primary : Sel_Primary);
2144 break; 2148 break;
2145 2149
2146#ifdef MOUSE_WHEEL 2150#ifdef MOUSE_WHEEL
2147 case Button4: 2151 case Button4:
2148 case Button5: 2152 case Button5:
2628 am_transparent = 0; 2632 am_transparent = 0;
2629 /* XXX: also turn off Opt_transparent? */ 2633 /* XXX: also turn off Opt_transparent? */
2630 } 2634 }
2631 else 2635 else
2632 { 2636 {
2633#if WAIT_FOR_WM
2634 /* wait (an arbitrary period) for the WM to do its thing
2635 * needed for fvwm2.2.2 (and before?) */
2636 sleep (1);
2637#endif
2638 for (n = 0; n < (unsigned int)i; n++) 2637 for (n = 0; n < (unsigned int)i; n++)
2639 { 2638 {
2640 XSetWindowBackgroundPixmap (disp, parent[n], ParentRelative); 2639 XSetWindowBackgroundPixmap (disp, parent[n], ParentRelative);
2641 XClearWindow (disp, parent[n]); 2640 XClearWindow (disp, parent[n]);
2642 } 2641 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines