--- rxvt-unicode/src/command.C 2006/01/16 06:37:51 1.264 +++ rxvt-unicode/src/command.C 2006/01/18 10:31:37 1.270 @@ -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); } @@ -1144,7 +1139,7 @@ cmdbuf_ptr = cmdbuf_base; cmdbuf_endp = cmdbuf_ptr + n; - ssize_t r = read (pty.pty, cmdbuf_endp, CBUFSIZ - n); + ssize_t r = read (pty->pty, cmdbuf_endp, CBUFSIZ - n); if (r > 0) { @@ -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; @@ -1508,6 +1504,8 @@ resize_all_windows (ev.xconfigure.width, ev.xconfigure.height, 1); } + HOOK_INVOKE ((this, HOOK_CONFIGURE_NOTIFY, DT_XEVENT, &ev, DT_END)); + #ifdef TRANSPARENT /* XXX: maybe not needed - leave in for now */ if (OPTION (Opt_transparent)) check_our_parents (); @@ -1588,10 +1586,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 +1599,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 +2086,6 @@ return; } - -#if MENUBAR - /* - * Menubar window processing of button press - */ - if (isMenuBarWindow (ev.window)) - menubar_control (ev); -#endif } void @@ -2121,9 +2101,6 @@ { scrollBar.setIdle (); scrollbar_show (0); -#ifndef NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING - refresh_type &= ~SMOOTH_REFRESH; -#endif } #ifdef SELECTION_SCROLLING @@ -2224,10 +2201,6 @@ #endif } } -#ifdef MENUBAR - else if (isMenuBarWindow (ev.window)) - menubar_control (ev); -#endif } #ifdef TRANSPARENT @@ -2780,7 +2753,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 +2779,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 +2796,7 @@ else { flag = true; - scr_refresh (refresh_type); + scr_refresh (); want_refresh = 1; } } @@ -3956,12 +3931,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 */ { @@ -4004,7 +3973,7 @@ else { set_locale (str); - pty.set_utf8_mode (enc_utf8); + pty->set_utf8_mode (enc_utf8); init_xlocale (); } break; @@ -4088,9 +4057,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 +4161,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)) @@ -4456,12 +4415,12 @@ if (HOOK_INVOKE ((this, HOOK_TT_WRITE, DT_STR_LEN, data, len, DT_END))) return; - if (pty.pty < 0) + if (pty->pty < 0) return; if (v_buflen == 0) { - ssize_t written = write (pty.pty, data, min (len, MAX_PTY_WRITE)); + ssize_t written = write (pty->pty, data, min (len, MAX_PTY_WRITE)); if ((unsigned int)written == len) return; @@ -4480,7 +4439,7 @@ void rxvt_term::pty_write () { - int written = write (pty.pty, v_buffer, min (v_buflen, MAX_PTY_WRITE)); + int written = write (pty->pty, v_buffer, min (v_buflen, MAX_PTY_WRITE)); if (written > 0) {