From: Pasi Kallinen Date: Fri, 1 Jan 2016 19:24:55 +0000 (+0200) Subject: Enable scroll bar in X11 menu windows X-Git-Tag: NetHack-3.6.1_RC01~1086 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8e7e79448ee5081eb7e922bb68226f8dde896322;p=nethack Enable scroll bar in X11 menu windows --- diff --git a/doc/fixes36.1 b/doc/fixes36.1 index a165348cf..3cc5261f6 100644 --- a/doc/fixes36.1 +++ b/doc/fixes36.1 @@ -101,6 +101,7 @@ MacOSX: force TIMED_DELAY build option on so that 'runmode' run-time option is functional X11: core bug for '`' (backtick) and #terrain commands was only noticed by X11 interface: impossible "add_menu: called before start_menu" +X11: enable a scroll bar in menu windows General New Features diff --git a/win/X11/winmisc.c b/win/X11/winmisc.c index 06eaaaa92..c966650c9 100644 --- a/win/X11/winmisc.c +++ b/win/X11/winmisc.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include /* for index() */ #include @@ -844,7 +845,7 @@ Widget **command_widgets; XtCallbackProc name_callback; Widget *formp; /* return */ { - Widget popup, form, label, above, left, right; + Widget popup, form, label, above, left, right, view; Widget *commands, *curr; int i; Arg args[8]; @@ -863,18 +864,24 @@ Widget *formp; /* return */ XtOverrideTranslations( popup, XtParseTranslationTable("WM_PROTOCOLS: ec_delete()")); + num_args = 0; + XtSetArg(args[num_args], XtNforceBars, False); num_args++; + XtSetArg(args[num_args], XtNallowVert, True); num_args++; + view = XtCreateManagedWidget("menuformview", viewportWidgetClass, popup, + args, num_args); + num_args = 0; XtSetArg(args[num_args], XtNtranslations, XtParseTranslationTable(popup_translations)); num_args++; - *formp = form = XtCreateManagedWidget("menuform", formWidgetClass, popup, + *formp = form = XtCreateManagedWidget("menuform", formWidgetClass, view, args, num_args); /* Get the default distance between objects in the form widget. */ num_args = 0; XtSetArg(args[num_args], nhStr(XtNdefaultDistance), &distance); num_args++; - XtGetValues(form, args, num_args); + XtGetValues(view, args, num_args); /* * Create the label.