Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 314243

Summary: [Widgets] Tooltip for tool item in inactive shell not updated when mouse moved to other item
Product: [Eclipse Project] Platform Reporter: Markus Keller <markus.kell.r>
Component: SWTAssignee: Scott Kovatch <skovatch>
Status: RESOLVED FIXED QA Contact: Silenio Quarti <Silenio_Quarti>
Severity: minor    
Priority: P3 CC: skovatch
Version: 3.5.2Flags: Silenio_Quarti: review+
Target Milestone: 3.6.1   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard:
Attachments:
Description Flags
Fix
none
final patch none

Description Markus Keller CLA 2010-05-25 07:12:04 EDT
3.5.2 and I20100523-0800 Cocoa

The tooltip for a tool item in an inactive shell is not updated when the mouse is moved to an other item in same group.

Steps:
- Control Example > ToolBar
- Set/Get API
- hover over fist item of example toolbar => hover is SWT.PUSH
- move mouse horizontally to third item
=> hover is still SWT.PUSH but should be SWT.RADIO. When the mouse leaves the toolbar area, the hover disappears and correctly appears the next time.

In the SDK, this can e.g. be seen in the main window toolbar when the Find/Replace dialog of a text editor is active, or in Javadoc hovers when you move the mouse into the hover, wait until the toolbar appears, and then hover over the tool items (without giving focus to the Javadoc hover)
Comment 1 Scott Kovatch CLA 2010-05-25 14:11:35 EDT
When a window is in active our tooltip tracking is using the wrong coordinates to search the toolbar for a ToolItem.
Comment 2 Scott Kovatch CLA 2010-05-25 14:12:49 EDT
Created attachment 169870 [details]
Fix

Not for 3.6 at this point.

If the hit view is in a different window than the event window we need to convert the point to the hit window's coordinate system.
Comment 3 Scott Kovatch CLA 2010-06-28 12:50:30 EDT
Silenio, please review for 3.6.1.
Comment 4 Silenio Quarti CLA 2010-07-05 14:56:24 EDT
Fix is good. Just move the new code inside of the "if (control != null)" statement. "eventPoint" is only needed inside that block. 

To keep comments consistent with parts of the SWT source code, we should avoid using personal pronouns in comments (we, I, etc).
Comment 5 Scott Kovatch CLA 2010-07-06 12:42:39 EDT
Created attachment 173577 [details]
final patch

Final patch, based on 3.6 branch.
Comment 6 Scott Kovatch CLA 2010-07-06 12:46:59 EDT
Fixed > 20100706 in 3.6 branch and HEAD