Browse Source

Disable IME when ICSharpCode.TextEditor is used in .NET 4.0.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@4900 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 16 years ago
parent
commit
ab01f26709
  1. 4
      src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/Ime.cs

4
src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/Ime.cs

@ -19,8 +19,10 @@ namespace ICSharpCode.TextEditor @@ -19,8 +19,10 @@ namespace ICSharpCode.TextEditor
{
public Ime(IntPtr hWnd, Font font)
{
// For unknown reasons, the IME support is causing crashes when used in a WOW64 process
// or when used in .NET 4.0. We'll disable IME support in those cases.
string PROCESSOR_ARCHITEW6432 = Environment.GetEnvironmentVariable("PROCESSOR_ARCHITEW6432");
if (PROCESSOR_ARCHITEW6432 == "IA64" || PROCESSOR_ARCHITEW6432 == "AMD64" || Environment.OSVersion.Platform == PlatformID.Unix) {
if (PROCESSOR_ARCHITEW6432 == "IA64" || PROCESSOR_ARCHITEW6432 == "AMD64" || Environment.OSVersion.Platform == PlatformID.Unix || Environment.Version >= new Version(4,0)) {
disableIME = true;
} else {
this.hIMEWnd = ImmGetDefaultIMEWnd(hWnd);

Loading…
Cancel
Save