summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSilenio Quarti <silenio_quarti@ca.ibm.com>2013-03-27 15:53:28 -0400
committerSilenio Quarti <silenio_quarti@ca.ibm.com>2013-03-27 15:54:12 -0400
commit245715fccdac7a440a5a58962ba380e5a11a5d22 (patch)
tree8b2f99b941c06d32766cfdd4e7d602b82c8a731c
parentd8e12db9b88dc96dbe41cc1c8e60f7059a2e208b (diff)
downloadeclipse.platform.swt-245715fccdac7a440a5a58962ba380e5a11a5d22.tar.gz
eclipse.platform.swt-245715fccdac7a440a5a58962ba380e5a11a5d22.tar.xz
eclipse.platform.swt-245715fccdac7a440a5a58962ba380e5a11a5d22.zip
Bug 403559 - Intermittent loss of caret (or cursor?)
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleControlSite.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleControlSite.java b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleControlSite.java
index 504eebf0b8..ccb511c64c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleControlSite.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleControlSite.java
@@ -710,14 +710,14 @@ void onFocusOut(Event e) {
lpgui1.cbSize = GUITHREADINFO.sizeof;
OS.GetGUIThreadInfo(threadId, lpgui1);
objIOleInPlaceObject.UIDeactivate();
+ if (SWT_RESTORECARET == 0) {
+ SWT_RESTORECARET = OS.RegisterWindowMessage (new TCHAR (0, "SWT_RESTORECARET", true));
+ }
if (lpgui1.hwndCaret != 0) {
GUITHREADINFO lpgui2 = new GUITHREADINFO();
lpgui2.cbSize = GUITHREADINFO.sizeof;
OS.GetGUIThreadInfo(threadId, lpgui2);
if (lpgui2.hwndCaret == 0 && lpgui1.hwndCaret == OS.GetFocus()) {
- if (SWT_RESTORECARET == 0) {
- SWT_RESTORECARET = OS.RegisterWindowMessage (new TCHAR (0, "SWT_RESTORECARET", true));
- }
/*
* If the caret was not restored by SWT, put it back using
* the information from GUITHREADINFO. Note that this will
@@ -733,6 +733,9 @@ void onFocusOut(Event e) {
}
}
}
+ if (lpgui1.hwndFocus != 0 && lpgui1.hwndFocus == OS.GetFocus()) {
+ OS.SendMessage (lpgui1.hwndFocus, SWT_RESTORECARET, 0, 0);
+ }
}
private int OnFocus(int fGotFocus) {
return COM.S_OK;