From: PatR Date: Tue, 16 Mar 2021 16:12:18 +0000 (-0700) Subject: X11 persistent inventory horizontal scrolling X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=23642b40d831759a298b2b3a9e523572b82a7cdb;p=nethack X11 persistent inventory horizontal scrolling Enable a horizontal scrollbar for the perm_invent window so that the '}' and '{' menu commands work for it. --- diff --git a/doc/fixes37.0 b/doc/fixes37.0 index fec31ab93..91c500a12 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -1,4 +1,4 @@ -NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.476 $ $NHDT-Date: 1615794750 2021/03/15 07:52:30 $ +NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.478 $ $NHDT-Date: 1615911117 2021/03/16 16:11:57 $ General Fixes and Modified Features ----------------------------------- @@ -568,6 +568,7 @@ X11: use visctrl(response) when X11_yn_function() echoes prompt+response in message window X11: when trying to lookup scrollbars in order to handle scrolling via keys, menu handling always ended up finding the top window +X11: enable horizontal scrollbar for persistent inventory window X11+OSX: after the "bad Atom" fix (below), the persistent inventory window crept downward every time it got updated diff --git a/win/X11/winmenu.c b/win/X11/winmenu.c index a80c4f620..438b89ae6 100644 --- a/win/X11/winmenu.c +++ b/win/X11/winmenu.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 winmenu.c $NHDT-Date: 1615712422 2021/03/14 09:00:22 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.46 $ */ +/* NetHack 3.7 winmenu.c $NHDT-Date: 1615911117 2021/03/16 16:11:57 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.48 $ */ /* Copyright (c) Dean Luick, 1992 */ /* NetHack may be freely redistributed. See license for details. */ @@ -969,7 +969,11 @@ X11_select_menu(winid window, int how, menu_item **menu_list) num_args = 0; XtSetArg(args[num_args], nhStr(XtNallowVert), True); num_args++; - XtSetArg(args[num_args], nhStr(XtNallowHoriz), False); num_args++; + /* allow horizontal scroll bar for persistent inventory window; + it could be allowed for any menu, but when scrolled to the side + the selector letters aren't visible so we won't do that [yet?] */ + XtSetArg(args[num_args], nhStr(XtNallowHoriz), permi ? True : False); + num_args++; XtSetArg(args[num_args], nhStr(XtNuseBottom), True); num_args++; XtSetArg(args[num_args], nhStr(XtNuseRight), True); num_args++; #if 0