mirror of
https://github.com/fltk/fltk.git
synced 2026-06-06 00:22:42 +08:00
The keyboard shortcut handling code did not handle 8-bit
characters properly (STR #731) src/Fl.cxx: - Fl::handle(): use unsigned char * for event_text() shortcut key conversion. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4064 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -2,6 +2,8 @@ CHANGES IN FLTK 1.1.7
|
|||||||
|
|
||||||
- Documentation fixes (STR #648, STR #692, STR #744, STR
|
- Documentation fixes (STR #648, STR #692, STR #744, STR
|
||||||
#745)
|
#745)
|
||||||
|
- The keyboard shortcut handling code did not handle
|
||||||
|
8-bit characters properly (STR #731)
|
||||||
- Fl_JPEG_Image could still crash an app with a corrupt
|
- Fl_JPEG_Image could still crash an app with a corrupt
|
||||||
JPEG file (STR #739)
|
JPEG file (STR #739)
|
||||||
- Using the layout alignment controls on a menu widget
|
- Using the layout alignment controls on a menu widget
|
||||||
|
|||||||
+1
-1
@@ -708,7 +708,7 @@ int Fl::handle(int e, Fl_Window* window)
|
|||||||
|
|
||||||
// and then try a shortcut with the case of the text swapped, by
|
// and then try a shortcut with the case of the text swapped, by
|
||||||
// changing the text and falling through to FL_SHORTCUT case:
|
// changing the text and falling through to FL_SHORTCUT case:
|
||||||
{char* c = (char*)event_text(); // cast away const
|
{unsigned char* c = (unsigned char*)event_text(); // cast away const
|
||||||
if (!isalpha(*c)) return 0;
|
if (!isalpha(*c)) return 0;
|
||||||
*c = isupper(*c) ? tolower(*c) : toupper(*c);}
|
*c = isupper(*c) ? tolower(*c) : toupper(*c);}
|
||||||
e_number = e = FL_SHORTCUT;
|
e_number = e = FL_SHORTCUT;
|
||||||
|
|||||||
Reference in New Issue
Block a user