From 8e682cb8a4e6275726feb0da333937717aaf0207 Mon Sep 17 00:00:00 2001 From: James Turner Date: Sat, 16 Jul 2011 13:25:29 +0100 Subject: [PATCH] Disable flight-related key-bindings in the WaypointList widget for 2.4 release, pending a better solution to PLIB's lack of focus. --- src/GUI/WaypointList.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/GUI/WaypointList.cxx b/src/GUI/WaypointList.cxx index 4f9d68b13..235ef960f 100644 --- a/src/GUI/WaypointList.cxx +++ b/src/GUI/WaypointList.cxx @@ -21,6 +21,11 @@ #include #include +// select if the widget grabs keys necessary to fly aircraft from the keyboard, +// or not. See http://code.google.com/p/flightgear-bugs/issues/detail?id=338 +// for discussion about why / what is going on. +#define AVOID_FLIGHT_KEYS 1 + using namespace flightgear; enum { @@ -659,6 +664,10 @@ int WaypointList::checkKey (int key, int updown ) if ((updown == PU_UP) || !isVisible () || !isActive () || (window != puGetWindow())) { return FALSE ; } + +#ifdef AVOID_FLIGHT_KEYS + return FALSE; +#endif switch (key) { -- 2.39.5