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.313 by root, Wed Jul 5 22:46:14 2006 UTC vs.
Revision 1.320 by root, Mon Apr 30 15:07:09 2007 UTC

1458 break; 1458 break;
1459 } 1459 }
1460 break; 1460 break;
1461 1461
1462 case FocusIn: 1462 case FocusIn:
1463 if (ev.xfocus.detail != NotifyInferior
1464 && ev.xfocus.detail != NotifyPointer
1465 && ev.xfocus.mode != NotifyGrab)
1463 focus_in (); 1466 focus_in ();
1464 break; 1467 break;
1465 1468
1466 case FocusOut: 1469 case FocusOut:
1470 if (ev.xfocus.detail != NotifyInferior
1471 && ev.xfocus.detail != NotifyPointer
1472 && ev.xfocus.mode != NotifyGrab)
1467 focus_out (); 1473 focus_out ();
1468 break; 1474 break;
1469 1475
1470 case ConfigureNotify: 1476 case ConfigureNotify:
1471 if (ev.xconfigure.window == parent[0]) 1477 if (ev.xconfigure.window == parent[0])
1472 { 1478 {
1479 resize_all_windows (ev.xconfigure.width, ev.xconfigure.height, 1); 1485 resize_all_windows (ev.xconfigure.width, ev.xconfigure.height, 1);
1480 } 1486 }
1481 1487
1482 HOOK_INVOKE ((this, HOOK_CONFIGURE_NOTIFY, DT_XEVENT, &ev, DT_END)); 1488 HOOK_INVOKE ((this, HOOK_CONFIGURE_NOTIFY, DT_XEVENT, &ev, DT_END));
1483 1489
1484#ifdef TRANSPARENT /* XXX: maybe not needed - leave in for now */ 1490#ifdef TRANSPARENT
1485 if (OPTION (Opt_transparent)) 1491 if (OPTION (Opt_transparent))
1486 check_our_parents (); 1492 check_our_parents ();
1487#endif 1493#endif
1488 } 1494 }
1489 break; 1495 break;
1788 pix_colors_focused [idx].fade (this, atoi (rs[Rs_fade]), pix_colors_unfocused [idx], c); 1794 pix_colors_focused [idx].fade (this, atoi (rs[Rs_fade]), pix_colors_unfocused [idx], c);
1789 } 1795 }
1790#endif 1796#endif
1791} 1797}
1792 1798
1793#if TRANSPARENT 1799#if TRANSPARENT || ENABLE_PERL
1794void 1800void
1795rxvt_term::rootwin_cb (XEvent &ev) 1801rxvt_term::rootwin_cb (XEvent &ev)
1796{ 1802{
1797 make_current (); 1803 make_current ();
1798 1804
1805 if (SHOULD_INVOKE (HOOK_ROOT_EVENT)
1806 && HOOK_INVOKE ((this, HOOK_ROOT_EVENT, DT_XEVENT, &ev, DT_END)))
1807 return;
1808
1809# if TRANSPARENT
1799 switch (ev.type) 1810 switch (ev.type)
1800 { 1811 {
1801 case PropertyNotify: 1812 case PropertyNotify:
1802 /* 1813 /*
1803 * if user used some Esetroot compatible prog to set the root bg, 1814 * if user used some Esetroot compatible prog to set the root bg,
1811 case ReparentNotify: 1822 case ReparentNotify:
1812 if (OPTION (Opt_transparent) && check_our_parents () && am_transparent) 1823 if (OPTION (Opt_transparent) && check_our_parents () && am_transparent)
1813 want_refresh = want_full_refresh = 1; 1824 want_refresh = want_full_refresh = 1;
1814 break; 1825 break;
1815 } 1826 }
1827# endif
1816} 1828}
1817#endif 1829#endif
1818 1830
1819void 1831void
1820rxvt_term::button_press (XButtonEvent &ev) 1832rxvt_term::button_press (XButtonEvent &ev)
2148 selection_make (ev.time); 2160 selection_make (ev.time);
2149 break; 2161 break;
2150 2162
2151 case Button2: 2163 case Button2:
2152 if (IN_RANGE_EXC (ev.x, 0, width) && IN_RANGE_EXC (ev.y, 0, height)) // inside window? 2164 if (IN_RANGE_EXC (ev.x, 0, width) && IN_RANGE_EXC (ev.y, 0, height)) // inside window?
2153 selection_request (ev.time, ev.state & ModMetaMask ? Sel_Primary : Sel_Primary); 2165 selection_request (ev.time, ev.state & ModMetaMask ? Sel_Clipboard : Sel_Primary);
2154 break; 2166 break;
2155 2167
2156#ifdef MOUSE_WHEEL 2168#ifdef MOUSE_WHEEL
2157 case Button4: 2169 case Button4:
2158 case Button5: 2170 case Button5:
3668 seen_esc = true; 3680 seen_esc = true;
3669 continue; 3681 continue;
3670 } 3682 }
3671 else if (ch == C0_BEL || ch == CHAR_ST) 3683 else if (ch == C0_BEL || ch == CHAR_ST)
3672 break; 3684 break;
3685 else if (ch == C0_SYN)
3686 ch = cmd_get8 ();
3673 else if (ch < 0x20) 3687 else if (ch < 0x20)
3674 return NULL; /* other control character - exit */ 3688 return NULL; /* other control character - exit */
3675 3689
3676 seen_esc = false; 3690 seen_esc = false;
3677 3691
3678 if (n >= STRING_MAX - 1) 3692 if (n >= STRING_MAX - 1)
3679 // stop at some sane length 3693 // stop at some sane length
3680 return NULL; 3694 return NULL;
3681 3695
3682 if (ch == C0_SYN)
3683 string[n++] = cmd_get8 ();
3684 else
3685 string[n++] = ch; 3696 string[n++] = ch;
3686 } 3697 }
3687 3698
3688 string[n++] = '\0'; 3699 string[n++] = '\0';
3689 3700
3690 ends_how = (ch == 0x5c ? C0_ESC : ch); 3701 ends_how = (ch == 0x5c ? C0_ESC : ch);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines