- Fixed unexpected shortcut behavior for Win32 (STR #2199)

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6802 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Matthias Melcher 2009-06-28 22:25:44 +00:00
parent 7f18e1002f
commit 121138fa93
2 changed files with 5 additions and 0 deletions

View File

@ -1,5 +1,6 @@
CHANGES IN FLTK 1.3.0
- Fixed unexpected shortcut behavior for Win32 (STR #2199)
- Fixed documentation for Fl_Progress (STR #2209)
- Fluid printing used wrong colors under Windows (STR #2195)
- Updated documentation for Fl_Input_

View File

@ -305,6 +305,10 @@ char Fl_Widget::label_shortcut(const char *t) {
}
int Fl_Widget::test_shortcut(const char *t) {
#ifdef WIN32
// on MSWindows, users expect shortcuts to work only when the Alt modifier is pressed
if (Fl::event_state(FL_ALT)==0) return 0;
#endif
char c = Fl::event_text()[0];
if (!c || !t) return 0;
if (c == label_shortcut(t))