Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikita Nemkin2019-07-15 11:52:57 +0000
committerNiraj Modi2019-07-15 11:52:57 +0000
commit36ea6466a2fdbf5a5d827af2b4fbf858ced30c5b (patch)
treebc93b94bc3bab3780e1761efc13543294f77422a
parentd8a3d3232b2baa5e01ee2454ed7d316c39e1a83c (diff)
downloadeclipse.platform.swt-36ea6466a2fdbf5a5d827af2b4fbf858ced30c5b.tar.gz
eclipse.platform.swt-36ea6466a2fdbf5a5d827af2b4fbf858ced30c5b.tar.xz
eclipse.platform.swt-36ea6466a2fdbf5a5d827af2b4fbf858ced30c5b.zip
Bug 543747 - [win32] JVM crash after connecting Windows Remote Desktop
Change-Id: I1adcf49f7f0383b1068b3500986d8c5a3975979b Co-authored-by: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java
index 6f082bfad0..ef3cf73d50 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -69,6 +69,7 @@ public abstract class Control extends Widget implements Drawable {
Region region;
Font font;
int drawCount, foreground, background, backgroundAlpha = 255;
+ long /*int*/ hPrevIMC;
/**
* Prevents uninitialized instances from being created outside the package.
@@ -722,7 +723,7 @@ void createHandle () {
}
if (OS.IsDBLocale && hwndParent != 0) {
long /*int*/ hIMC = OS.ImmGetContext (hwndParent);
- OS.ImmAssociateContext (handle, hIMC);
+ hPrevIMC = OS.ImmAssociateContext (handle, hIMC);
OS.ImmReleaseContext (hwndParent, hIMC);
}
@@ -2523,7 +2524,8 @@ void releaseParent () {
void releaseWidget () {
super.releaseWidget ();
if (OS.IsDBLocale) {
- OS.ImmAssociateContext (handle, 0);
+ OS.ImmAssociateContext (handle, hPrevIMC);
+ hPrevIMC = 0;
}
if (toolTipText != null) {
setToolTipText (getShell (), null);

Back to the top