diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-10-10 19:39:49 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-10-10 19:39:49 +0000 |
| commit | 8b7b26b7bf7fb43fee1342c18fff49c3b753fd95 (patch) | |
| tree | 4021879fa717ef3419e594a276a5548d16e55ee5 /src/Fl_Button.cxx | |
| parent | 77c3efad19f1fd47a26cfaec43d47667ec2661d9 (diff) | |
Take focus when the user presses a shortcut.
Call the callback when the user clicks or drags in a readonly input
field.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2664 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Button.cxx')
| -rw-r--r-- | src/Fl_Button.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Fl_Button.cxx b/src/Fl_Button.cxx index 46751371a..f83d8cefc 100644 --- a/src/Fl_Button.cxx +++ b/src/Fl_Button.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Button.cxx,v 1.4.2.6.2.16 2002/08/09 01:09:48 easysw Exp $" +// "$Id: Fl_Button.cxx,v 1.4.2.6.2.17 2002/10/10 19:39:48 easysw Exp $" // // Button widget for the Fast Light Tool Kit (FLTK). // @@ -103,6 +103,9 @@ int Fl_Button::handle(int event) { case FL_SHORTCUT: if (!(shortcut() ? Fl::test_shortcut(shortcut()) : test_shortcut())) return 0; + + if (Fl::visible_focus() && handle(FL_FOCUS)) Fl::focus(this); + if (type() == FL_RADIO_BUTTON && !value_) { setonly(); if (when() & FL_WHEN_CHANGED) do_callback(); @@ -145,5 +148,5 @@ Fl_Button::Fl_Button(int X, int Y, int W, int H, const char *l) } // -// End of "$Id: Fl_Button.cxx,v 1.4.2.6.2.16 2002/08/09 01:09:48 easysw Exp $". +// End of "$Id: Fl_Button.cxx,v 1.4.2.6.2.17 2002/10/10 19:39:48 easysw Exp $". // |
