diff --git a/doc/fixes37.0 b/doc/fixes37.0 index 04e64186e..b68978a00 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -1,4 +1,4 @@ -NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.318 $ $NHDT-Date: 1601600393 2020/10/02 00:59:53 $ +NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.321 $ $NHDT-Date: 1601940384 2020/10/05 23:26:24 $ General Fixes and Modified Features ----------------------------------- @@ -430,6 +430,9 @@ Qt: 3.6 catchup - show unexplored locations as unexplored rather than as stone Qt: tried to honor 'showexp' but the value was unintentionally suppressed by [lack of definition for] obsolete conditional EXP_ON_BOTL Qt: implement --More-- prompt to support MSGTYPE=stop +Qt: for menu search, don't require clicking on the search target popup before + typing target string (was using typed letters to make menu selections + if player didn't click on the popup first) Qt+QSX: fix control key Qt+OSX: rename menu entry "nethack->Preferences..." for invoking nethack's 'O' command to "Game->Run-time options" and entry "Game->Qt settings" diff --git a/win/Qt/qt_menu.cpp b/win/Qt/qt_menu.cpp index 1da9426d7..d2cf8eee1 100644 --- a/win/Qt/qt_menu.cpp +++ b/win/Qt/qt_menu.cpp @@ -6,8 +6,6 @@ // // TODO: -// search behaves weirdly unless you click in the line-edit dialog box -// after clicking on the [search] button to pop that up; // implement next_page, prev_page, first_page, and last_page to work // like they do for X11: scroll menu window as if it were paginated; // entering a count that uses more digits than the previous biggest count diff --git a/win/Qt/qt_streq.cpp b/win/Qt/qt_streq.cpp index b37ab305f..96133edec 100644 --- a/win/Qt/qt_streq.cpp +++ b/win/Qt/qt_streq.cpp @@ -83,6 +83,13 @@ bool NetHackQtStringRequestor::Get(char* buffer, int maxchar) #endif centerOnMain(this); show(); + // Make sure that setFocus() really does change keyboard focus. + // This allows typing to go directly to the NetHackQtLineEdit + // widget without clicking on or in it first. Not needed for + // qt_getline() but is needed for menu Search to prevent typed + // characters being treated as making menu selections. + if (!input.isActiveWindow()) + input.activateWindow(); input.setFocus(); exec();