Skip to content

Commit

Permalink
Fix keyboard handling in Fl_Glut_Window::handle().
Browse files Browse the repository at this point in the history
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2629 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
michaelrsweet committed Sep 19, 2002
1 parent e252f90 commit e27f09e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGES
@@ -1,5 +1,9 @@
CHANGES IN FLTK 1.1.0rc7

- Fl_Glut_Window now takes keyboard focus and handles
shortcut events.
- The MacOS X implementation of fl_ready() now checks
the event queue for events.
- Fl_PNM_Image now supports the XV/GIMP thumbnail format
(P7).
- Fl_Preferences would not find groups inside the root
Expand Down
8 changes: 6 additions & 2 deletions src/glut_compatability.cxx
@@ -1,5 +1,5 @@
//
// "$Id: glut_compatability.cxx,v 1.4.2.5.2.3 2002/08/09 03:17:30 easysw Exp $"
// "$Id: glut_compatability.cxx,v 1.4.2.5.2.4 2002/09/19 02:53:00 easysw Exp $"
//
// GLUT emulation routines for the Fast Light Tool Kit (FLTK).
//
Expand Down Expand Up @@ -83,6 +83,7 @@ int Fl_Glut_Window::handle(int event) {
switch (event) {

case FL_PUSH:
if (keyboard || special) Fl::focus(this);
button = Fl::event_button()-1;
if (button<0) button = 0;
if (button>2) button = 2;
Expand Down Expand Up @@ -121,6 +122,9 @@ int Fl_Glut_Window::handle(int event) {
if (keyboard || special) return 1;
break;

case FL_SHORTCUT:
if (!keyboard && !special) break;

case FL_KEYBOARD:
if (Fl::event_text()[0]) {
if (keyboard) {keyboard(Fl::event_text()[0],ex,ey); return 1;}
Expand Down Expand Up @@ -402,5 +406,5 @@ int glutLayerGet(GLenum type) {
#endif

//
// End of "$Id: glut_compatability.cxx,v 1.4.2.5.2.3 2002/08/09 03:17:30 easysw Exp $".
// End of "$Id: glut_compatability.cxx,v 1.4.2.5.2.4 2002/09/19 02:53:00 easysw Exp $".
//

0 comments on commit e27f09e

Please sign in to comment.