summaryrefslogtreecommitdiff
path: root/fluid/Fl_Menu_Type.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <git@matthiasm.com>2021-12-17 19:37:34 +0100
committerMatthias Melcher <github@matthiasm.com>2021-12-17 19:48:59 +0100
commit6d9df0763fcb5a60e229ce270352d57da2d88abb (patch)
tree640d3ea1c215b66fb997804f65b106e4c7959023 /fluid/Fl_Menu_Type.cxx
parent55e5c74e9e6a31bc6b75b479546ff4e84b1c935a (diff)
GitHub #327: menu buttons will no longer grab arrow keys.
In Fluid, selecting a menu button, and selecting it again to make it movable would also grab the text input focus, which would prevent the enclosing window from using arrow key events to manipulate the selected widget.
Diffstat (limited to 'fluid/Fl_Menu_Type.cxx')
-rw-r--r--fluid/Fl_Menu_Type.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/fluid/Fl_Menu_Type.cxx b/fluid/Fl_Menu_Type.cxx
index d05f7eadd..d7e5fc5ea 100644
--- a/fluid/Fl_Menu_Type.cxx
+++ b/fluid/Fl_Menu_Type.cxx
@@ -485,6 +485,7 @@ Fl_Type* Fl_Menu_Type::click_test(int, int) {
w->value((Fl_Menu_Item*)0);
Fl::pushed(w);
w->handle(FL_PUSH);
+ Fl::focus(NULL);
const Fl_Menu_Item* m = w->mvalue();
if (m) {
// restore the settings of toggles & radio items:
@@ -586,6 +587,7 @@ Fl_Type* Fl_Input_Choice_Type::click_test(int, int) {
w->value((Fl_Menu_Item*)0);
Fl::pushed(w);
w->handle(FL_PUSH);
+ Fl::focus(NULL);
const Fl_Menu_Item* m = w->mvalue();
if (m) {
// restore the settings of toggles & radio items: