]> granicus.if.org Git - nethack/commitdiff
Ignore Alt-key navigation to menubar, as it's annoying when you
authorwarwick <warwick>
Wed, 16 Jan 2002 03:09:12 +0000 (03:09 +0000)
committerwarwick <warwick>
Wed, 16 Jan 2002 03:09:12 +0000 (03:09 +0000)
use Alt-Direction to move around.

win/Qt/qt_win.cpp

index fbdd9c42ab5d332586e117cec092767774bda893..8105f6cdc0dca2591e37285c59588149d6d41173 100644 (file)
@@ -4981,6 +4981,11 @@ void NetHackQtBind::qt_outrip(winid wid, int how)
 
 bool NetHackQtBind::notify(QObject *receiver, QEvent *event)
 {
+    // Ignore Alt-key navigation to menubar, it's annoying when you
+    // use Alt-Direction to move around.
+    if ( main && event->type()==QEvent::KeyRelease && main==receiver )
+       return TRUE;
+
     bool result=QApplication::notify(receiver,event);
     if (event->type()==QEvent::KeyPress) {
        QKeyEvent* key_event=(QKeyEvent*)event;