Bug 416620 - Tooltips in detached views / editors are sometimes behind the window
Summary: Tooltips in detached views / editors are sometimes behind the window
Status: NEW
Alias: None
Product: GEF
Classification: Tools
Component: GEF-Legacy Draw2d (show other bugs)
Version: 3.8   Edit
Hardware: PC Windows 7
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: gef-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-05 07:54 EDT by Christian CLA
Modified: 2015-09-16 09:31 EDT (History)
1 user (show)

See Also:


Attachments
Screenshot (65.79 KB, image/jpeg)
2013-09-05 07:54 EDT, Christian CLA
no flags Details
Example (100.96 KB, application/zip)
2013-09-05 07:55 EDT, Christian CLA
no flags Details
Patch that recreates PopupHelper's LWS/Shell on parent Shell change (1.03 KB, patch)
2015-09-16 09:31 EDT, Manuel Steurer CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christian CLA 2013-09-05 07:54:36 EDT
Created attachment 235192 [details]
Screenshot

The attached example is one the GEF Examples with the only difference that the 2 figures have tooltips.
Steps to reproduce:
1. start the plugin and open the shape editor
2. create a figure and open its tooltip
3. detach the editor
4. open the tooltip a the figure again

Sometimes it does not happen at the first try.
Comment 1 Christian CLA 2013-09-05 07:55:14 EDT
Created attachment 235193 [details]
Example
Comment 2 Manuel Steurer CLA 2015-09-16 09:31:30 EDT
Created attachment 256614 [details]
Patch that recreates PopupHelper's LWS/Shell on parent Shell change

To me the root of the problem seems to be the cached Shell and LightweightSystem in Draw2D's PopUpHelper. When you detach the editor, the parent-Shell of the popup-Shell should be the new detached Shell, but it still is the initial Shell, usually the workbench-window, which I think causes the in-between ToolTip. Also, if you detach first, show the tooltip, re-attach and try to show the tooltip, you get an exception.
I attached a patch which looks for parent shell changes and invalidates cached Shell and LWS in this case. Users of the changed methods now have to deal with the possibility that getShell() and getLightweightSystem() may return different Objects on successive calls, don't know if that is acceptable for API.