--- rxvt-unicode/src/command.C 2006/01/16 06:37:51 1.264 +++ rxvt-unicode/src/command.C 2006/01/17 05:47:42 1.268 @@ -921,9 +921,7 @@ } /*}}} */ -#if MENUBAR_MAX || defined (KEYSYM_RESOURCE) -/*{{{ rxvt_cmd_write (), rxvt_cmd_getc () */ -/* attempt to `write' count to the input buffer */ +#if defined (KEYSYM_RESOURCE) unsigned int rxvt_term::cmd_write (const char *str, unsigned int count) { @@ -1010,7 +1008,7 @@ while (row < end_row); } - scr_refresh (refresh_type); + scr_refresh (); scrollbar_show (1); #ifdef USE_XIM IMSendSpot (); @@ -1072,7 +1070,6 @@ if ((scrollbar_isUp() || scrollbar_isDn()) && scr_page (scrollbar_isUp() ? UP : DN, 1)) { - refresh_type |= SMOOTH_REFRESH; want_refresh = 1; w.start (w.at + SCROLLBAR_CONTINUOUS_DELAY); } @@ -1086,7 +1083,6 @@ if (scr_page (scroll_selection_dir, scroll_selection_lines)) { selection_extend (selection_save_x, selection_save_y, selection_save_state); - refresh_type |= SMOOTH_REFRESH; want_refresh = 1; w.start (w.at + SCROLLBAR_CONTINUOUS_DELAY); } @@ -1104,7 +1100,6 @@ if (view_start == top_row || view_start == 0) mouse_slip_wheel_speed = 0; - refresh_type |= SMOOTH_REFRESH; want_refresh = 1; w.start (w.at + SCROLLBAR_CONTINUOUS_DELAY); } @@ -1308,6 +1303,7 @@ dDisp; if (ev.xany.window == vt + && SHOULD_INVOKE (HOOK_X_EVENT) && HOOK_INVOKE ((this, HOOK_X_EVENT, DT_XEVENT, &ev, DT_END))) return; @@ -1588,10 +1584,6 @@ scrollBar.setIdle (); scrollbar_show (0); } -#ifdef MENUBAR - if (menubar_visible () && isMenuBarWindow (ev.xany.window)) - menubar_expose (); -#endif #ifdef TRANSPARENT if (am_transparent && ev.xany.window == parent[0]) @@ -1605,19 +1597,13 @@ if (hidden_pointer) pointer_unblank (); #endif -#if MENUBAR - if (isMenuBarWindow (ev.xany.window)) - { - menubar_control (ev.xbutton); - break; - } -#endif if ((priv_modes & PrivMode_mouse_report) && !bypass_keystate) break; if (ev.xany.window == vt) { - if (HOOK_INVOKE ((this, HOOK_MOTION_NOTIFY, DT_XEVENT, &ev, DT_END))) + if (SHOULD_INVOKE (HOOK_MOTION_NOTIFY) + && HOOK_INVOKE ((this, HOOK_MOTION_NOTIFY, DT_XEVENT, &ev, DT_END))) ; // nop else if (ev.xbutton.state & (Button1Mask | Button3Mask)) { @@ -2098,14 +2084,6 @@ return; } - -#if MENUBAR - /* - * Menubar window processing of button press - */ - if (isMenuBarWindow (ev.window)) - menubar_control (ev); -#endif } void @@ -2121,9 +2099,6 @@ { scrollBar.setIdle (); scrollbar_show (0); -#ifndef NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING - refresh_type &= ~SMOOTH_REFRESH; -#endif } #ifdef SELECTION_SCROLLING @@ -2224,10 +2199,6 @@ #endif } } -#ifdef MENUBAR - else if (isMenuBarWindow (ev.window)) - menubar_control (ev); -#endif } #ifdef TRANSPARENT @@ -2780,7 +2751,8 @@ // scr_add_lines only works for nlines <= nrow - 1. if (nlines >= nrow - 1) { - if (!HOOK_INVOKE ((this, HOOK_ADD_LINES, DT_WCS_LEN, buf, str - buf, DT_END))) + if (!(SHOULD_INVOKE (HOOK_ADD_LINES) + && HOOK_INVOKE ((this, HOOK_ADD_LINES, DT_WCS_LEN, buf, str - buf, DT_END)))) scr_add_lines (buf, str - buf, nlines); nlines = 0; @@ -2805,7 +2777,8 @@ ch = next_char (); } - if (!HOOK_INVOKE ((this, HOOK_ADD_LINES, DT_WCS_LEN, buf, str - buf, DT_END))) + if (!(SHOULD_INVOKE (HOOK_ADD_LINES) + && HOOK_INVOKE ((this, HOOK_ADD_LINES, DT_WCS_LEN, buf, str - buf, DT_END)))) scr_add_lines (buf, str - buf, nlines); /* @@ -2821,7 +2794,7 @@ else { flag = true; - scr_refresh (refresh_type); + scr_refresh (); want_refresh = 1; } } @@ -3956,12 +3929,6 @@ // TODO, when secure mode? break; -#ifdef MENUBAR - case URxvt_Menu: - if (OPTION (Opt_insecure)) - menubar_dispatch (const_cast(str)); // casting away constness is checked - break; -#endif #if 0 case Rxvt_dumpscreen: /* no error notices */ { @@ -4088,9 +4055,6 @@ { 7, PrivMode_Autowrap }, // 8, bi-directional support mode { 9, PrivMode_MouseX10 }, -#ifdef menuBar_esc - { menuBar_esc, PrivMode_menuBar }, -#endif // 18, 19 printing-related { 25, PrivMode_VisibleCursor }, #ifdef scrollBar_esc @@ -4195,13 +4159,6 @@ if (state) /* orthogonal */ priv_modes &= ~PrivMode_MouseX11; break; -#ifdef menuBar_esc - case menuBar_esc: -#ifdef MENUBAR - map_menuBar (state); -#endif - break; -#endif #ifdef scrollBar_esc case scrollBar_esc: if (scrollbar_mapping (state))