--- rxvt-unicode/src/menubar.C 2005/02/04 11:41:23 1.22 +++ rxvt-unicode/src/menubar.C 2005/11/30 14:23:29 1.25 @@ -1565,9 +1565,9 @@ } } } + /* * remove leading/trailing space - * and strip-off leading/trailing quotes * skip blank or comment lines */ rxvt_Str_trim (p); @@ -1946,6 +1946,7 @@ else BuildMenu = menu; } + if (BuildMenu != NULL) { if (name == NULL || name[0] == '\0') @@ -1954,7 +1955,6 @@ { const char *n1; menuitem_t *item; - menu_t *BuildMenu = BuildMenu; n1 = strcmp (name, SEPARATOR_NAME) ? name : ""; item = rxvt_menuitem_find (BuildMenu, n1); @@ -1973,6 +1973,7 @@ } } } + menubar_expose (); } break; @@ -2250,20 +2251,7 @@ case MenuAction: case MenuTerminalAction: drawbox_menuitem (this_y, -1); -#ifdef HAVE_NANOSLEEP - struct timespec rqt; - - rqt.tv_sec = 0; - rqt.tv_nsec = MENU_DELAY_USEC * 1000; - nanosleep (&rqt, NULL); -#else - /* use select for timing */ - struct timeval tv; - - tv.tv_sec = 0; - tv.tv_usec = MENU_DELAY_USEC; - select (0, NULL, NULL, NULL, &tv); -#endif + rxvt_usleep (MENU_DELAY_USEC); /* remove menu before sending keys to the application */ menu_hide_all (); #ifndef DEBUG_MENU @@ -2351,23 +2339,7 @@ + (Width2Pixel (4 * i + i + 4)) / 4)) { draw_Arrows (Arrows[i].name, -1); - { -#ifdef HAVE_NANOSLEEP - struct timespec rqt; - - rqt.tv_sec = 0; - rqt.tv_nsec = MENU_DELAY_USEC * 1000; - nanosleep (&rqt, NULL); -#else - /* use select for timing */ - struct timeval tv; - - tv.tv_sec = 0; - tv.tv_usec = MENU_DELAY_USEC; - select (0, NULL, NULL, NULL, &tv); -#endif - - } + rxvt_usleep (MENU_DELAY_USEC); draw_Arrows (Arrows[i].name, +1); #ifdef DEBUG_MENUARROWS fprintf (stderr, "'%c': ", Arrows[i].name);