Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 233957 Details for
Bug 336600
[hovering] Caret lost when selecting text in the Javadoc hover and then click into editor
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
patch
PR336600.patch (text/plain), 4.76 KB, created by
Silenio Quarti
on 2013-07-30 17:32:13 EDT
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Silenio Quarti
Created:
2013-07-30 17:32:13 EDT
Size:
4.76 KB
patch
obsolete
>diff --git a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleClientSite.java b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleClientSite.java >index 3ddae69..68febd2 100644 >--- a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleClientSite.java >+++ b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleClientSite.java >@@ -886,7 +886,7 @@ private boolean isOffice2007(boolean program) { > if (programID.equals("PowerPoint.Show.12")) return true; //$NON-NLS-1$ > return false; > } >-private int OnClose() { >+int OnClose() { > return COM.S_OK; > } > private int OnDataChange(long /*int*/ pFormatetc, long /*int*/ pStgmed) { >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 a834882..ada8969 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 >@@ -653,6 +653,15 @@ private int Invoke(int dispIdMember, long /*int*/ riid, int lcid, int dwFlags, l > return COM.DISP_E_MEMBERNOTFOUND; > } > } >+int OnClose() { >+ getDisplay().asyncExec(new Runnable() { >+ public void run() { >+ System.out.println("onFocusOut"); >+ fixCaret(); >+ } >+ }); >+ return COM.S_OK; >+} > private int OnControlInfoChanged() { > long /*int*/[] ppvObject = new long /*int*/[1]; > if (objIUnknown.QueryInterface(COM.IIDIOleControl, ppvObject) == COM.S_OK) { >@@ -666,6 +675,18 @@ private int OnControlInfoChanged() { > return COM.S_OK; > } > protected int OnUIDeactivate(int fUndoable) { >+ /* >+ * Bug in Windows. When IE7 loses focus and UIDeactivate() >+ * is called, IE destroys the caret even though it is >+ * no longer owned by IE. If focus has moved to a control >+ * that shows a caret then the caret disappears. The fix >+ * is to detect this case and restore the caret. >+ */ >+ int threadId = OS.GetCurrentThreadId(); >+ lpgui1 = new GUITHREADINFO(); >+ lpgui1.cbSize = GUITHREADINFO.sizeof; >+ OS.GetGUIThreadInfo(threadId, lpgui1); >+ System.out.println("OnUIDeactivate caret=" + lpgui1.hwndCaret + " " + lpgui1.hwndFocus); > return super.OnUIDeactivate(fUndoable); > } > void onFocusIn(Event e) { >@@ -697,27 +718,27 @@ void onFocusOut(Event e) { > * our site. In such cases the site should not be UIDeactivated. > */ > if (isFocusControl()) return; >- >- /* >- * Bug in Windows. When IE7 loses focus and UIDeactivate() >- * is called, IE destroys the caret even though it is >- * no longer owned by IE. If focus has moved to a control >- * that shows a caret then the caret disappears. The fix >- * is to detect this case and restore the caret. >- */ >- int threadId = OS.GetCurrentThreadId(); >- GUITHREADINFO lpgui1 = new GUITHREADINFO(); >- lpgui1.cbSize = GUITHREADINFO.sizeof; >- OS.GetGUIThreadInfo(threadId, lpgui1); > objIOleInPlaceObject.UIDeactivate(); >+ getDisplay().asyncExec(new Runnable() { >+ public void run() { >+ System.out.println("onFocusOut"); >+ fixCaret(); >+ } >+ }); >+} >+GUITHREADINFO lpgui1; >+void fixCaret() { >+ if (lpgui1 == null) return; > if (SWT_RESTORECARET == 0) { > SWT_RESTORECARET = OS.RegisterWindowMessage (new TCHAR (0, "SWT_RESTORECARET", true)); > } > if (lpgui1.hwndCaret != 0) { >+ int threadId = OS.GetCurrentThreadId(); > GUITHREADINFO lpgui2 = new GUITHREADINFO(); > lpgui2.cbSize = GUITHREADINFO.sizeof; > OS.GetGUIThreadInfo(threadId, lpgui2); > if (lpgui2.hwndCaret == 0 && lpgui1.hwndCaret == OS.GetFocus()) { >+ System.out.println("FIXING 1=" + lpgui1.hwndCaret); > /* > * If the caret was not restored by SWT, put it back using > * the information from GUITHREADINFO. Note that this will >@@ -733,8 +754,10 @@ void onFocusOut(Event e) { > } > } > } else if (lpgui1.hwndFocus != 0 && lpgui1.hwndFocus == OS.GetFocus()) { >+ System.out.println("FIXING 2=" + lpgui1.hwndFocus); > OS.SendMessage (lpgui1.hwndFocus, SWT_RESTORECARET, 0, 0); > } >+ lpgui1 = null; > } > private int OnFocus(int fGotFocus) { > return COM.S_OK; >diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Canvas.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Canvas.java >index d8ff2f0..72146d9 100644 >--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Canvas.java >+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Canvas.java >@@ -331,6 +331,7 @@ long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long / > if (msg == Display.SWT_RESTORECARET) { > if ((state & CANVAS) != 0) { > if (caret != null) { >+ System.out.println("FIXED"); > caret.killFocus (); > caret.setFocus (); > return 1;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 336600
:
233899
| 233957