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.266 by root, Mon Jan 16 08:57:02 2006 UTC vs.
Revision 1.268 by root, Tue Jan 17 05:47:42 2006 UTC

919#endif /* DEBUG_CMD */ 919#endif /* DEBUG_CMD */
920 tt_write (kbuf, (unsigned int)len); 920 tt_write (kbuf, (unsigned int)len);
921} 921}
922/*}}} */ 922/*}}} */
923 923
924#if MENUBAR_MAX || defined (KEYSYM_RESOURCE) 924#if defined (KEYSYM_RESOURCE)
925/*{{{ rxvt_cmd_write (), rxvt_cmd_getc () */
926/* attempt to `write' count to the input buffer */
927unsigned int 925unsigned int
928rxvt_term::cmd_write (const char *str, unsigned int count) 926rxvt_term::cmd_write (const char *str, unsigned int count)
929{ 927{
930 unsigned int n, s; 928 unsigned int n, s;
931 929
1008 while (l->is_longer () && row < end_row); 1006 while (l->is_longer () && row < end_row);
1009 } 1007 }
1010 while (row < end_row); 1008 while (row < end_row);
1011 } 1009 }
1012 1010
1013 scr_refresh (refresh_type); 1011 scr_refresh ();
1014 scrollbar_show (1); 1012 scrollbar_show (1);
1015#ifdef USE_XIM 1013#ifdef USE_XIM
1016 IMSendSpot (); 1014 IMSendSpot ();
1017#endif 1015#endif
1018 } 1016 }
1070rxvt_term::cont_scroll_cb (time_watcher &w) 1068rxvt_term::cont_scroll_cb (time_watcher &w)
1071{ 1069{
1072 if ((scrollbar_isUp() || scrollbar_isDn()) && 1070 if ((scrollbar_isUp() || scrollbar_isDn()) &&
1073 scr_page (scrollbar_isUp() ? UP : DN, 1)) 1071 scr_page (scrollbar_isUp() ? UP : DN, 1))
1074 { 1072 {
1075 refresh_type |= SMOOTH_REFRESH;
1076 want_refresh = 1; 1073 want_refresh = 1;
1077 w.start (w.at + SCROLLBAR_CONTINUOUS_DELAY); 1074 w.start (w.at + SCROLLBAR_CONTINUOUS_DELAY);
1078 } 1075 }
1079} 1076}
1080#endif 1077#endif
1084rxvt_term::sel_scroll_cb (time_watcher &w) 1081rxvt_term::sel_scroll_cb (time_watcher &w)
1085{ 1082{
1086 if (scr_page (scroll_selection_dir, scroll_selection_lines)) 1083 if (scr_page (scroll_selection_dir, scroll_selection_lines))
1087 { 1084 {
1088 selection_extend (selection_save_x, selection_save_y, selection_save_state); 1085 selection_extend (selection_save_x, selection_save_y, selection_save_state);
1089 refresh_type |= SMOOTH_REFRESH;
1090 want_refresh = 1; 1086 want_refresh = 1;
1091 w.start (w.at + SCROLLBAR_CONTINUOUS_DELAY); 1087 w.start (w.at + SCROLLBAR_CONTINUOUS_DELAY);
1092 } 1088 }
1093} 1089}
1094#endif 1090#endif
1102 : scr_page (UP, mouse_slip_wheel_speed)) 1098 : scr_page (UP, mouse_slip_wheel_speed))
1103 { 1099 {
1104 if (view_start == top_row || view_start == 0) 1100 if (view_start == top_row || view_start == 0)
1105 mouse_slip_wheel_speed = 0; 1101 mouse_slip_wheel_speed = 0;
1106 1102
1107 refresh_type |= SMOOTH_REFRESH;
1108 want_refresh = 1; 1103 want_refresh = 1;
1109 w.start (w.at + SCROLLBAR_CONTINUOUS_DELAY); 1104 w.start (w.at + SCROLLBAR_CONTINUOUS_DELAY);
1110 } 1105 }
1111} 1106}
1112#endif 1107#endif
1587 if (isScrollbarWindow (ev.xany.window)) 1582 if (isScrollbarWindow (ev.xany.window))
1588 { 1583 {
1589 scrollBar.setIdle (); 1584 scrollBar.setIdle ();
1590 scrollbar_show (0); 1585 scrollbar_show (0);
1591 } 1586 }
1592#ifdef MENUBAR
1593 if (menubar_visible () && isMenuBarWindow (ev.xany.window))
1594 menubar_expose ();
1595#endif
1596 1587
1597#ifdef TRANSPARENT 1588#ifdef TRANSPARENT
1598 if (am_transparent && ev.xany.window == parent[0]) 1589 if (am_transparent && ev.xany.window == parent[0])
1599 XClearWindow (disp, ev.xany.window); 1590 XClearWindow (disp, ev.xany.window);
1600#endif 1591#endif
1603 1594
1604 case MotionNotify: 1595 case MotionNotify:
1605#ifdef POINTER_BLANK 1596#ifdef POINTER_BLANK
1606 if (hidden_pointer) 1597 if (hidden_pointer)
1607 pointer_unblank (); 1598 pointer_unblank ();
1608#endif
1609#if MENUBAR
1610 if (isMenuBarWindow (ev.xany.window))
1611 {
1612 menubar_control (ev.xbutton);
1613 break;
1614 }
1615#endif 1599#endif
1616 if ((priv_modes & PrivMode_mouse_report) && !bypass_keystate) 1600 if ((priv_modes & PrivMode_mouse_report) && !bypass_keystate)
1617 break; 1601 break;
1618 1602
1619 if (ev.xany.window == vt) 1603 if (ev.xany.window == vt)
2098 } 2082 }
2099 } 2083 }
2100 2084
2101 return; 2085 return;
2102 } 2086 }
2103
2104#if MENUBAR
2105 /*
2106 * Menubar window processing of button press
2107 */
2108 if (isMenuBarWindow (ev.window))
2109 menubar_control (ev);
2110#endif
2111} 2087}
2112 2088
2113void 2089void
2114rxvt_term::button_release (XButtonEvent &ev) 2090rxvt_term::button_release (XButtonEvent &ev)
2115{ 2091{
2121 2097
2122 if (scrollbar_isUpDn ()) 2098 if (scrollbar_isUpDn ())
2123 { 2099 {
2124 scrollBar.setIdle (); 2100 scrollBar.setIdle ();
2125 scrollbar_show (0); 2101 scrollbar_show (0);
2126#ifndef NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING
2127 refresh_type &= ~SMOOTH_REFRESH;
2128#endif
2129 } 2102 }
2130 2103
2131#ifdef SELECTION_SCROLLING 2104#ifdef SELECTION_SCROLLING
2132 if (sel_scroll_ev.active) 2105 if (sel_scroll_ev.active)
2133 sel_scroll_ev.stop(); 2106 sel_scroll_ev.stop();
2224 } 2197 }
2225 break; 2198 break;
2226#endif 2199#endif
2227 } 2200 }
2228 } 2201 }
2229#ifdef MENUBAR
2230 else if (isMenuBarWindow (ev.window))
2231 menubar_control (ev);
2232#endif
2233} 2202}
2234 2203
2235#ifdef TRANSPARENT 2204#ifdef TRANSPARENT
2236#if TINTING 2205#if TINTING
2237/* taken from aterm-0.4.2 */ 2206/* taken from aterm-0.4.2 */
2823 if (OPTION (Opt_jumpScroll) && refresh_limit < REFRESH_PERIOD) 2792 if (OPTION (Opt_jumpScroll) && refresh_limit < REFRESH_PERIOD)
2824 refresh_limit++; 2793 refresh_limit++;
2825 else 2794 else
2826 { 2795 {
2827 flag = true; 2796 flag = true;
2828 scr_refresh (refresh_type); 2797 scr_refresh ();
2829 want_refresh = 1; 2798 want_refresh = 1;
2830 } 2799 }
2831 } 2800 }
2832 2801
2833 } 2802 }
3958 3927
3959 case XTerm_logfile: 3928 case XTerm_logfile:
3960 // TODO, when secure mode? 3929 // TODO, when secure mode?
3961 break; 3930 break;
3962 3931
3963#ifdef MENUBAR
3964 case URxvt_Menu:
3965 if (OPTION (Opt_insecure))
3966 menubar_dispatch (const_cast<char *>(str)); // casting away constness is checked
3967 break;
3968#endif
3969#if 0 3932#if 0
3970 case Rxvt_dumpscreen: /* no error notices */ 3933 case Rxvt_dumpscreen: /* no error notices */
3971 { 3934 {
3972 int fd; 3935 int fd;
3973 if ((fd = open (str, O_RDWR | O_CREAT | O_EXCL, 0600)) >= 0) 3936 if ((fd = open (str, O_RDWR | O_CREAT | O_EXCL, 0600)) >= 0)
4090 { 5, PrivMode_rVideo }, 4053 { 5, PrivMode_rVideo },
4091 { 6, PrivMode_relOrigin }, 4054 { 6, PrivMode_relOrigin },
4092 { 7, PrivMode_Autowrap }, 4055 { 7, PrivMode_Autowrap },
4093 // 8, bi-directional support mode 4056 // 8, bi-directional support mode
4094 { 9, PrivMode_MouseX10 }, 4057 { 9, PrivMode_MouseX10 },
4095#ifdef menuBar_esc
4096 { menuBar_esc, PrivMode_menuBar },
4097#endif
4098 // 18, 19 printing-related 4058 // 18, 19 printing-related
4099 { 25, PrivMode_VisibleCursor }, 4059 { 25, PrivMode_VisibleCursor },
4100#ifdef scrollBar_esc 4060#ifdef scrollBar_esc
4101 { scrollBar_esc, PrivMode_scrollBar }, 4061 { scrollBar_esc, PrivMode_scrollBar },
4102#endif 4062#endif
4197 /* case 8: - auto repeat, can't do on a per window basis */ 4157 /* case 8: - auto repeat, can't do on a per window basis */
4198 case 9: /* X10 mouse reporting */ 4158 case 9: /* X10 mouse reporting */
4199 if (state) /* orthogonal */ 4159 if (state) /* orthogonal */
4200 priv_modes &= ~PrivMode_MouseX11; 4160 priv_modes &= ~PrivMode_MouseX11;
4201 break; 4161 break;
4202#ifdef menuBar_esc
4203 case menuBar_esc:
4204#ifdef MENUBAR
4205 map_menuBar (state);
4206#endif
4207 break;
4208#endif
4209#ifdef scrollBar_esc 4162#ifdef scrollBar_esc
4210 case scrollBar_esc: 4163 case scrollBar_esc:
4211 if (scrollbar_mapping (state)) 4164 if (scrollbar_mapping (state))
4212 { 4165 {
4213 resize_all_windows (0, 0, 0); 4166 resize_all_windows (0, 0, 0);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines