Browse Source

Linux keyboard locale fix.

tags/2021-05-28
jules 11 years ago
parent
commit
e9d5dec7bd
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      modules/juce_gui_basics/native/juce_linux_Windowing.cpp

+ 4
- 2
modules/juce_gui_basics/native/juce_linux_Windowing.cpp View File

@@ -1345,10 +1345,12 @@ public:
ScopedXLock xlock;
updateKeyStates (keyEvent.keycode, true);
const char* oldLocale = ::setlocale (LC_ALL, 0);
String oldLocale (::setlocale (LC_ALL, 0));
::setlocale (LC_ALL, "");
XLookupString (&keyEvent, utf8, sizeof (utf8), &sym, 0);
::setlocale (LC_ALL, oldLocale);
if (oldLocale.isNotEmpty())
::setlocale (LC_ALL, oldLocale.toRawUTF8());
unicodeChar = *CharPointer_UTF8 (utf8);
keyCode = (int) unicodeChar;


Loading…
Cancel
Save