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.239 by root, Fri Jan 6 03:02:22 2006 UTC vs.
Revision 1.244 by root, Fri Jan 6 17:09:27 2006 UTC

25 * - extensive modifications 25 * - extensive modifications
26 * Copyright (c) 1998 Alfredo K. Kojima <kojima@windowmaker.org> 26 * Copyright (c) 1998 Alfredo K. Kojima <kojima@windowmaker.org>
27 * Copyright (c) 2001 Marius Gedminas 27 * Copyright (c) 2001 Marius Gedminas
28 * - Ctrl/Mod4+Tab works like Meta+Tab (options) 28 * - Ctrl/Mod4+Tab works like Meta+Tab (options)
29 * Copyright (c) 2003 Rob McMullen <robm@flipturn.org> 29 * Copyright (c) 2003 Rob McMullen <robm@flipturn.org>
30 * Copyright (c) 2003-2005 Marc Lehmann <pcg@goof.com> 30 * Copyright (c) 2003-2006 Marc Lehmann <pcg@goof.com>
31 * 31 *
32 * This program is free software; you can redistribute it and/or modify 32 * This program is free software; you can redistribute it and/or modify
33 * it under the terms of the GNU General Public License as published by 33 * it under the terms of the GNU General Public License as published by
34 * the Free Software Foundation; either version 2 of the License, or 34 * the Free Software Foundation; either version 2 of the License, or
35 * (at your option) any later version. 35 * (at your option) any later version.
867#endif 867#endif
868 /* nil */ ; 868 /* nil */ ;
869 } 869 }
870 } 870 }
871 871
872 if (HOOK_INVOKE ((this, HOOK_KEY_PRESS, DT_XEVENT, &ev, DT_STRING_LEN, kbuf, len, DT_END)))
873 return;
874
872 if (len <= 0) 875 if (len <= 0)
873 return; /* not mapped */ 876 return; /* not mapped */
874 877
875 if (OPTION (Opt_scrollTtyKeypress)) 878 if (OPTION (Opt_scrollTtyKeypress))
876 if (view_start) 879 if (view_start)
1202 1205
1203#ifdef POINTER_BLANK 1206#ifdef POINTER_BLANK
1204void 1207void
1205rxvt_term::pointer_blank () 1208rxvt_term::pointer_blank ()
1206{ 1209{
1207 if (! OPTION (Opt_pointerBlank)) 1210 if (!OPTION (Opt_pointerBlank))
1208 return; 1211 return;
1209 1212
1210 XDefineCursor (display->display, vt, display->blank_cursor); 1213 XDefineCursor (display->display, vt, display->blank_cursor);
1211 XFlush (display->display); 1214 XFlush (display->display);
1212 1215
1411# endif 1414# endif
1412 else 1415 else
1413 iso14755buf = 0; 1416 iso14755buf = 0;
1414 } 1417 }
1415#endif 1418#endif
1419
1420 if (ev.xany.window == vt
1421 && HOOK_INVOKE ((this, HOOK_KEY_RELEASE, DT_XEVENT, &ev, DT_END)))
1422 break;
1416 1423
1417#if defined(MOUSE_WHEEL) && defined(MOUSE_SLIP_WHEELING) 1424#if defined(MOUSE_WHEEL) && defined(MOUSE_SLIP_WHEELING)
1418 if (!(ev.xkey.state & ControlMask)) 1425 if (!(ev.xkey.state & ControlMask))
1419 slip_wheel_ev.stop (); 1426 slip_wheel_ev.stop ();
1420 else if (ks == XK_Control_L || ks == XK_Control_R) 1427 else if (ks == XK_Control_L || ks == XK_Control_R)
1635 if ((priv_modes & PrivMode_mouse_report) && !bypass_keystate) 1642 if ((priv_modes & PrivMode_mouse_report) && !bypass_keystate)
1636 break; 1643 break;
1637 1644
1638 if (ev.xany.window == vt) 1645 if (ev.xany.window == vt)
1639 { 1646 {
1647 if (HOOK_INVOKE ((this, HOOK_MOTION_NOTIFY, DT_XEVENT, &ev, DT_END)))
1648 ; // nop
1640 if (ev.xbutton.state & (Button1Mask | Button3Mask)) 1649 else if (ev.xbutton.state & (Button1Mask | Button3Mask))
1641 { 1650 {
1642 while (XCheckTypedWindowEvent (disp, vt, MotionNotify, &ev)) 1651 while (XCheckTypedWindowEvent (disp, vt, MotionNotify, &ev))
1643 ; 1652 ;
1644 1653
1645 XQueryPointer (disp, vt, 1654 XQueryPointer (disp, vt,
1865#ifdef MOUSE_REPORT_DOUBLECLICK 1874#ifdef MOUSE_REPORT_DOUBLECLICK
1866 if (ev.button == MEvent.button && clickintime) 1875 if (ev.button == MEvent.button && clickintime)
1867 { 1876 {
1868 /* same button, within alloted time */ 1877 /* same button, within alloted time */
1869 MEvent.clicks++; 1878 MEvent.clicks++;
1879
1870 if (MEvent.clicks > 1) 1880 if (MEvent.clicks > 1)
1871 { 1881 {
1872 /* only report double clicks */ 1882 /* only report double clicks */
1873 MEvent.clicks = 2; 1883 MEvent.clicks = 2;
1874 mouse_report (ev); 1884 mouse_report (ev);
1894 else 1904 else
1895 { 1905 {
1896 if (ev.button != MEvent.button) 1906 if (ev.button != MEvent.button)
1897 MEvent.clicks = 0; 1907 MEvent.clicks = 0;
1898 1908
1899 if (!HOOK_INVOKE ((this, HOOK_MOUSE_CLICK, DT_XEVENT, &ev, DT_END))) 1909 if (!HOOK_INVOKE ((this, HOOK_BUTTON_PRESS, DT_XEVENT, &ev, DT_END)))
1900 switch (ev.button) 1910 switch (ev.button)
1901 { 1911 {
1902 case Button1: 1912 case Button1:
1903 /* allow meta + click to select rectangular areas */ 1913 /* allow meta + click to select rectangular areas */
1904 /* should be done in screen.C */ 1914 /* should be done in screen.C */
2082 } 2092 }
2083 2093
2084 break; 2094 break;
2085 } 2095 }
2086 } 2096 }
2097
2087 return; 2098 return;
2088 } 2099 }
2100
2089#if MENUBAR 2101#if MENUBAR
2090 /* 2102 /*
2091 * Menubar window processing of button press 2103 * Menubar window processing of button press
2092 */ 2104 */
2093 if (isMenuBarWindow (ev.window)) 2105 if (isMenuBarWindow (ev.window))
2155 */ 2167 */
2156 if (priv_modes & PrivMode_mouse_report 2168 if (priv_modes & PrivMode_mouse_report
2157 && bypass_keystate 2169 && bypass_keystate
2158 && ev.button == Button1 && MEvent.clicks <= 1) 2170 && ev.button == Button1 && MEvent.clicks <= 1)
2159 selection_extend (ev.x, ev.y, 0); 2171 selection_extend (ev.x, ev.y, 0);
2172
2173 if (HOOK_INVOKE ((this, HOOK_BUTTON_RELEASE, DT_XEVENT, &ev, DT_END)))
2174 return;
2160 2175
2161 switch (ev.button) 2176 switch (ev.button)
2162 { 2177 {
2163 case Button1: 2178 case Button1:
2164 case Button3: 2179 case Button3:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines