diff --git a/doc/fixes5-0-1.txt b/doc/fixes5-0-1.txt index 5393f619a..17fb06f49 100644 --- a/doc/fixes5-0-1.txt +++ b/doc/fixes5-0-1.txt @@ -244,6 +244,7 @@ Windows: in the event that there is a collision between a menu group X11: obey timed_delay X11: improve TTY-style status line with text attributes for status hilites, hitpointbar, some unicode support, 3-line status +X11: fix menu windows being taller than the screen General New Features diff --git a/win/X11/winmenu.c b/win/X11/winmenu.c index 1c6885648..4e2210966 100644 --- a/win/X11/winmenu.c +++ b/win/X11/winmenu.c @@ -1062,6 +1062,7 @@ X11_select_menu(winid window, int how, menu_item **menu_list) menu_create_entries(wp, &menu_info->curr_menu); /* if viewport will be bigger than the screen, limit its height */ + XtRealizeWidget(wp->popup); /* need to realize before we get size/pos */ num_args = 0; XtSetArg(args[num_args], XtNwidth, &v_pixel_width); num_args++; XtSetArg(args[num_args], XtNheight, &v_pixel_height); num_args++; @@ -1076,9 +1077,8 @@ X11_select_menu(winid window, int how, menu_item **menu_list) num_args = 0; XtSetArg(args[num_args], XtNwidth, v_pixel_width); num_args++; XtSetArg(args[num_args], XtNheight, v_pixel_height); num_args++; - XtSetValues(wp->w, args, num_args); + XtSetValues(wp->popup, args, num_args); } - XtRealizeWidget(wp->popup); /* need to realize before we position */ /* if menu is not up, position it */ if (!menu_info->is_up) {