mirror of https://github.com/fltk/fltk
Fixed occasional international keyboard problems on OS X thanks to misleading indentation.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6860 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
cec4292c32
commit
b863eed5ec
|
@ -1532,25 +1532,6 @@ void fl_open_display() {
|
|||
CFRelease(execUrl);
|
||||
}
|
||||
|
||||
// imm: keycode handler stub setting - use Gestalt to determine the running system version,
|
||||
// then set the keycode_function pointer accordingly
|
||||
SInt32 MacVersion;
|
||||
if (Gestalt(gestaltSystemVersion, &MacVersion) == noErr)
|
||||
{
|
||||
// SInt32 maj, min, fix;
|
||||
// Gestalt(gestaltSystemVersionMajor, &maj); // e.g. 10
|
||||
// Gestalt(gestaltSystemVersionMinor, &min); // e.g. 4
|
||||
// Gestalt(gestaltSystemVersionBugFix, &fix); // e.g. 11
|
||||
if(MacVersion >= 0x1050) { // 10.5.0 or later
|
||||
keycode_function = keycodeToUnicode;
|
||||
}
|
||||
else {
|
||||
keycode_function = keycode_wrap_old; // pre-10.5 mechanism
|
||||
}
|
||||
}
|
||||
// else our default handler will be used (keycode_wrap_old)
|
||||
|
||||
|
||||
if( !bundle )
|
||||
{
|
||||
// Earlier versions of this code tried to use weak linking, however it
|
||||
|
@ -1571,6 +1552,17 @@ void fl_open_display() {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// imm: keycode handler stub setting - use Gestalt to determine the running system version,
|
||||
// then set the keycode_function pointer accordingly
|
||||
keycode_function = keycode_wrap_old; // default to pre-10.5 mechanism
|
||||
SInt32 MacVersion;
|
||||
if (Gestalt(gestaltSystemVersion, &MacVersion) == noErr)
|
||||
{
|
||||
if(MacVersion >= 0x1050) { // 10.5.0 or later
|
||||
keycode_function = keycodeToUnicode;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue