]> granicus.if.org Git - nethack/commitdiff
X11 persistent inventory horizontal scrolling
authorPatR <rankin@nethack.org>
Tue, 16 Mar 2021 16:12:18 +0000 (09:12 -0700)
committerPatR <rankin@nethack.org>
Tue, 16 Mar 2021 16:12:18 +0000 (09:12 -0700)
Enable a horizontal scrollbar for the perm_invent window so that
the '}' and '{' menu commands work for it.

doc/fixes37.0
win/X11/winmenu.c

index fec31ab93b0be51205c0ee0ae39f8b33b6d83b84..91c500a12e8b275267765449bbb976d52b69c00a 100644 (file)
@@ -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
 
index a80c4f62004bbc8a66e3746adf0072a8fbeec5e1..438b89ae6c9828399bbe3a68daf89264fa9edc56 100644 (file)
@@ -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