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 233899 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), 3.15 KB, created by
Silenio Quarti
on 2013-07-29 12:47:42 EDT
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Silenio Quarti
Created:
2013-07-29 12:47:42 EDT
Size:
3.15 KB
patch
obsolete
>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..4499b1b 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 >@@ -705,34 +705,43 @@ void onFocusOut(Event e) { > * 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(); >+ final int threadId = OS.GetCurrentThreadId(); >+ final GUITHREADINFO lpgui1 = new GUITHREADINFO(); > lpgui1.cbSize = GUITHREADINFO.sizeof; > OS.GetGUIThreadInfo(threadId, lpgui1); >+ System.out.println(lpgui1.hwndCaret + " " + lpgui1.hwndFocus + " " + OS.GetFocus()); > objIOleInPlaceObject.UIDeactivate(); > if (SWT_RESTORECARET == 0) { > SWT_RESTORECARET = OS.RegisterWindowMessage (new TCHAR (0, "SWT_RESTORECARET", true)); > } >+ System.out.println(lpgui1.hwndCaret + " " + lpgui1.hwndFocus + " " + OS.GetFocus()); > 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 the caret was not restored by SWT, put it back using >- * the information from GUITHREADINFO. Note that this will >- * not be correct when the caret has a bitmap. There is no >- * API to query the bitmap that the caret is using. >- */ >- if (OS.SendMessage (lpgui1.hwndCaret, SWT_RESTORECARET, 0, 0) == 0) { >- int width = lpgui1.right - lpgui1.left; >- int height = lpgui1.bottom - lpgui1.top; >- OS.CreateCaret (lpgui1.hwndCaret, 0, width, height); >- OS.SetCaretPos (lpgui1.left, lpgui1.top); >- OS.ShowCaret (lpgui1.hwndCaret); >+ getDisplay().asyncExec(new Runnable() { >+ public void run() { >+ GUITHREADINFO lpgui2 = new GUITHREADINFO(); >+ lpgui2.cbSize = GUITHREADINFO.sizeof; >+ OS.GetGUIThreadInfo(threadId, lpgui2); >+ System.out.println("=>" + lpgui2.hwndCaret + " " + lpgui2.hwndFocus + " " + OS.GetFocus()); >+ if (lpgui2.hwndCaret == 0 && lpgui1.hwndCaret == OS.GetFocus()) { >+ /* >+ * If the caret was not restored by SWT, put it back using >+ * the information from GUITHREADINFO. Note that this will >+ * not be correct when the caret has a bitmap. There is no >+ * API to query the bitmap that the caret is using. >+ */ >+ System.out.println("FIXING1"); >+ if (OS.SendMessage (lpgui1.hwndCaret, SWT_RESTORECARET, 0, 0) == 0) { >+ int width = lpgui1.right - lpgui1.left; >+ int height = lpgui1.bottom - lpgui1.top; >+ OS.CreateCaret (lpgui1.hwndCaret, 0, width, height); >+ OS.SetCaretPos (lpgui1.left, lpgui1.top); >+ OS.ShowCaret (lpgui1.hwndCaret); >+ } >+ } > } >- } >+ }); > } else if (lpgui1.hwndFocus != 0 && lpgui1.hwndFocus == OS.GetFocus()) { >+ System.out.println("FIXING2"); > OS.SendMessage (lpgui1.hwndFocus, SWT_RESTORECARET, 0, 0); > } > }
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