Bug 956

Summary: NewtCanvasSWT ignore windowing offset on OSX using ViewForm
Product: [JogAmp] Jogl Reporter: Petros Koutsolampros <pjgl>
Component: swtAssignee: Petros Koutsolampros <pjgl>
Status: RESOLVED FIXED    
Severity: normal CC: pjgl, sgothel
Priority: ---    
Version: 2   
Hardware: pc_all   
OS: macosx   
See Also: https://jogamp.org/bugzilla/show_bug.cgi?id=672
Type: DEFECT SCM Refs:
Workaround: ---
Bug Depends on:    
Bug Blocks: 969    
Attachments: Viewform

Description Petros Koutsolampros 2014-01-31 13:56:35 CET
Created attachment 583 [details]
Viewform

As reported here: http://forum.jogamp.org/NewtCanvasSWT-problem-td4030973.html

To recreate create a new eclipse view (plugin) as described here:

http://www.eclipse.org/articles/viewArticle/ViewArticle2.html

and put the attachment in the source. 

Make sure you state the view in plugin.xml:

      <view
            name="Newt View"
            icon="icons/sample.gif"
            category="TestPlugin"
            class="testplugin.views.JOGLTestNewt"
            id="testplugin.views.JOGLTestNewt">
      </view>

to see the view, you need to go to Window -> Show View -> Other... -> [category as described in plugin.xml] -> [view as described in plugin.xml]

In general the problem is another iteration of Bug 672 (https://jogamp.org/bugzilla/show_bug.cgi?id=672)

The solution there was to get the position of the parent. That solution though does not seem to work here, so we need a universal solution. 

Control.toDisplay(int x, int y); provided by swt directly ( http://help.eclipse.org/indigo/nftopic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/widgets/Control.html#toDisplay(int, int) ) gives the position of an element on the screen directly, and seems like a reasonable way to determine the position our element is supposed to have, without depending on different calculations of the window first and then the component
Comment 1 Sven Gothel 2019-03-30 02:58:25 CET
Fixed via bug 969 I assume. Otherwise we need to reopen it.