summaryrefslogtreecommitdiff
path: root/src/Fl.cxx
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-10-21 09:46:20 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-10-21 09:46:20 +0200
commit7a434575acc6cb8121ae790ab94250b331b412f4 (patch)
tree19ec146d1e46ec39e1fb38b7aa17d72daa531037 /src/Fl.cxx
parent9817536cfd4a9ea8d9bb5ef41580a5ba3d254911 (diff)
Fix "Keyboard sometimes stops working after Ctrl/+ or Ctrl/-" (#794)
Diffstat (limited to 'src/Fl.cxx')
-rw-r--r--src/Fl.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Fl.cxx b/src/Fl.cxx
index e204a1cd5..94cfff6e8 100644
--- a/src/Fl.cxx
+++ b/src/Fl.cxx
@@ -943,6 +943,10 @@ Fl_Widget* fl_oldfocus; // kludge for Fl_Group...
/**
Sets the widget that will receive FL_KEYBOARD events.
+ Use this function inside the \c handle(int) member function of a widget of yours
+ to give focus to the widget, for example when it receives the FL_FOCUS or the FL_PUSH event.
+ Otherwise, use Fl_Widget::take_focus() to give focus to a widget;
+
If you change Fl::focus(), the previous widget and all
parents (that don't contain the new widget) are sent FL_UNFOCUS
events. Changing the focus does \e not send FL_FOCUS to