Author: matt
Date: 2009-06-28 15:25:51 -0700 (Sun, 28 Jun 2009)
New Revision: 6803
Log:
- Fixed unexpected shortcut behavior for Win32 (STR #2199)

Modified:
   branches/branch-1.1/CHANGES
   branches/branch-1.1/src/fl_shortcut.cxx

Modified: branches/branch-1.1/CHANGES
===================================================================
--- branches/branch-1.1/CHANGES 2009-06-28 22:25:44 UTC (rev 6802)
+++ branches/branch-1.1/CHANGES 2009-06-28 22:25:51 UTC (rev 6803)
@@ -1,5 +1,6 @@
 CHANGES IN FLTK 1.1.10
 
+       - Fixed unexpected shortcut behavior for Win32 (STR #2199)
        - Added cast to Fl_Color in all Fluid code (STR #2206)
        - Fixed wrong identifier for special keys combined with 
          modifier (STR #2196)

Modified: branches/branch-1.1/src/fl_shortcut.cxx
===================================================================
--- branches/branch-1.1/src/fl_shortcut.cxx     2009-06-28 22:25:44 UTC (rev 
6802)
+++ branches/branch-1.1/src/fl_shortcut.cxx     2009-06-28 22:25:51 UTC (rev 
6803)
@@ -222,6 +222,10 @@
 }
 
 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))

_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to