aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSilenio Quarti2013-03-27 15:53:28 (EDT)
committerCarolyn MacLeod2013-04-09 10:57:00 (EDT)
commit3f9213d4528539e1ae27d29da532ba0c1a2e98d9 (patch)
treea4ff5dd7d96b42ecc23984bc6f202b08d369970d
parent4addcf9877ef38b5e4a86a086e54a75992610577 (diff)
downloadeclipse.platform.swt-3f9213d4528539e1ae27d29da532ba0c1a2e98d9.zip
eclipse.platform.swt-3f9213d4528539e1ae27d29da532ba0c1a2e98d9.tar.gz
eclipse.platform.swt-3f9213d4528539e1ae27d29da532ba0c1a2e98d9.tar.bz2
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 504eebf..ccb511c 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;