| [ Return to Bugs & Features | Roadmap 2.0 | SVN ⇄ GIT ]
STR #213
Application: | FLTK Library |
Status: | 1 - Closed w/Resolution |
Priority: | 4 - High, e.g. key functionality not working |
Scope: | 3 - Applies to all machines and operating systems |
Subsystem: | GLUT Emulation |
Summary: | Bug in glutGetModifiers |
Version: | 2.0-current |
Created By: | shree.procsys |
Assigned To: | spitzak |
Fix Version: | 2.0-current (SVN: v4111) |
Update Notification: | |
Trouble Report Files:
No files
Trouble Report Comments:
|
#1 | shree.procsys 05:46 Nov 17, 2003 |
| This bug is present in version 1.1.2 and is also present in 2.0cvs.
Essentially boils down to:
glutGetModifiers() must return a bitwise OR of GLUT_ACTIVE_SHIFT, GLUT_ACTIVE_CTRL, and GLUT_ACTIVE_ALT -- see the GLUT spec for more info.
The current implementation is:[see fltk/glut.h]
inline int glutGetModifiers() {return fltk::event_state();}
which returns a host of other flags in addition to the three mentioned above.
The right implementation would be ------------8<-------------------------- // WARNING: these values are different than Glut uses: enum { GLUT_ACTIVE_SHIFT = fltk::SHIFT, GLUT_ACTIVE_CTRL = fltk::CTRL, GLUT_ACTIVE_ALT = fltk::ALT }; inline int glutGetModifiers() { return fltk::event_state() & (GLUT_ACTIVE_SHIFT | GLUT_ACTIVE_CTRL | GLUT_ACTIVE_ALT) ;} ------------8<--------------------------
With this change, I'm happily using glut + Fltk in my projects . Fltk rocks!
Not sure if assigned high priority is OK - it is a simple bug fix - but took me some time to find! | |
|
#2 | mike 20:39 Mar 10, 2004 |
| Thanks, fixed for 1.1.5; passing to Bill for 2.0... | |
|
#3 | spitzak 16:12 Mar 11, 2004 |
| Fixed in 2.0 as well (I will check in the code tonight)
| |
|
#4 | mike 16:06 Mar 12, 2005 |
| Fixed in Subversion repository.
| |
[ Return to Bugs & Features ]
|
| |