Bug 956 - NewtCanvasSWT ignore windowing offset on OSX using ViewForm
Summary: NewtCanvasSWT ignore windowing offset on OSX using ViewForm
Status: RESOLVED FIXED
Alias: None
Product: Jogl
Classification: JogAmp
Component: swt (show other bugs)
Version: 2
Hardware: pc_all macosx
: --- normal
Assignee: Petros Koutsolampros
URL:
Depends on:
Blocks: 969
  Show dependency treegraph
 
Reported: 2014-01-31 13:56 CET by Petros Koutsolampros
Modified: 2019-03-30 02:58 CET (History)
2 users (show)

See Also:
Type: DEFECT
SCM Refs:
Workaround: ---


Attachments
Viewform (3.76 KB, text/x-java)
2014-01-31 13:56 CET, Petros Koutsolampros
Details

Note You need to log in before you can comment on or make changes to this bug.
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.