Summary: | NewtCanvasSWT Overlap on MacOSX with Multiple RCP perspectives | ||
---|---|---|---|
Product: | [JogAmp] Newt | Reporter: | Marcel Au <marcel.au> |
Component: | macosx | Assignee: | Sven Gothel <sgothel> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | gouessej |
Priority: | P4 | ||
Version: | 2.4.0 | ||
Hardware: | All | ||
OS: | macosx | ||
Type: | DEFECT | SCM Refs: | |
Workaround: | --- | ||
Bug Depends on: | 1358 | ||
Bug Blocks: | 674 | ||
Attachments: |
An opened 3D perspective
Opened non 3D perspective - 3D view overlaps other views Another 3D perspective Overlap of 3D view in another selected perspective 3D view reparenting the NEWTCanvasSWT |
Description
Marcel Au
2019-04-18 16:06:49 CEST
Created attachment 808 [details]
An opened 3D perspective
Created attachment 809 [details]
Opened non 3D perspective - 3D view overlaps other views
Created attachment 810 [details]
Another 3D perspective
Created attachment 811 [details]
Overlap of 3D view in another selected perspective
Created attachment 812 [details]
3D view reparenting the NEWTCanvasSWT
I think the bug could be reproduced on MacOSX with Eclipse running a JOGL NEWTCanvasSWT view as a plugin and then switching perspectives. At the moment I can only reproduce it in my application: https://bio7.org (In reply to Marcel Au from comment #6) > I think the bug could be reproduced on MacOSX with Eclipse running a JOGL > NEWTCanvasSWT view as a plugin and then switching perspectives. > > At the moment I can only reproduce it in my application: > > https://bio7.org We'll really need a SSCCE in order to be sure that the culprit is in JOGL itself. (In reply to Julien Gouesse from comment #7) > (In reply to Marcel Au from comment #6) > > I think the bug could be reproduced on MacOSX with Eclipse running a JOGL > > NEWTCanvasSWT view as a plugin and then switching perspectives. > > > > At the moment I can only reproduce it in my application: > > > > https://bio7.org > > We'll really need a SSCCE in order to be sure that the culprit is in JOGL > itself. I try to create a simple example after my easter vacation. I think a SWT canvas with two tabs (one with NEWTCanvasSWT) should reproduce the behaviour on Mac. I've made an hopefully reproducible example: https://github.com/Bio7/Jogl/tree/master/JoglMacBug/src/newt This example is a SWT Shell with two tabs embedded. One tab embedds the Newt JOGL canvas. The other tab is empty. On, e.g., Windows when I switch to the second(empty) tab the Newt canvas is hidden. The Newt JOGL canvas itself (first tab) is resizeable. On MacOSX when I switch to the empty tab the Newt canvas still overlays the tab. Resizing of the Newt tab doesn't work properly (moving the shell is possible, though). In addition an JOGL icon is set (which is annoying when you have embedded JOGL in an app whith it's own icon because it replaces the app icon in the dock) This bug seems to similar to this older bug with NewtAWT: https://jogamp.org/bugzilla/show_bug.cgi?id=1274 (In reply to Marcel Au from comment #10) > This bug seems to similar to this older bug with NewtAWT: > > https://jogamp.org/bugzilla/show_bug.cgi?id=1274 Do you suspect a particular change in some source code common to NewtCanvasAWT and NewtCanvasSWT? (In reply to Julien Gouesse from comment #11) > (In reply to Marcel Au from comment #10) > > This bug seems to similar to this older bug with NewtAWT: > > > > https://jogamp.org/bugzilla/show_bug.cgi?id=1274 > > Do you suspect a particular change in some source code common to > NewtCanvasAWT and NewtCanvasSWT? Not for me to say. I just recently switched from SWT_AWT to Newt (which comes with an impressive performance gain). I just saw this older thread which might be related. I think that somehow the NewtCanvasSWT resize and visible commands are not transfered from the SWT canvas to the embedded Newt window (if my example is correct since I found no swt newt example at all). I will try to manipulate the NEWT window with an SWT listener at the weekend on my Mac. Maybe I can find out more if it is related to the NewtSWTCanvas or the embedded Newt window itself. Linux and Windows should work though. (In reply to Julien Gouesse from comment #11) > (In reply to Marcel Au from comment #10) > > This bug seems to similar to this older bug with NewtAWT: > > > > https://jogamp.org/bugzilla/show_bug.cgi?id=1274 > > Do you suspect a particular change in some source code common to > NewtCanvasAWT and NewtCanvasSWT? It seems to me that the newt window implementation is responsible for this behaviour. The scale in the linked example with JOGL 2.3.2 is also not correct. I fixed that in my NewtCanvas implementation here: https://github.com/Bio7/bio7/blob/master/com.eco.bio7.WorldWind/src/com/eco/bio7/worldwind/swt/NewtCanvasSWT.java#L129 However I'm not able to hide the Newt window if a tab change occur (see example). (In reply to Marcel Au from comment #14) > (In reply to Julien Gouesse from comment #11) > > (In reply to Marcel Au from comment #10) > > > This bug seems to similar to this older bug with NewtAWT: > > > > > > https://jogamp.org/bugzilla/show_bug.cgi?id=1274 > > > > Do you suspect a particular change in some source code common to > > NewtCanvasAWT and NewtCanvasSWT? > > It seems to me that the newt window implementation is responsible for this > behaviour. > The scale in the linked example with JOGL 2.3.2 is also not correct. > > > I fixed that in my NewtCanvas implementation here: > > https://github.com/Bio7/bio7/blob/master/com.eco.bio7.WorldWind/src/com/eco/ > bio7/worldwind/swt/NewtCanvasSWT.java#L129 > > However I'm not able to hide the Newt window if a tab change occur (see > example). Thank you for the feedback. It's better than nothing, I don't feel comfortable with using DPIUtil as it's an internal class, it's not in the public official API but your workaround gives a clear idea of how to fix a symptom of this bug and where. Fix to Bug 1358 might be related as it also intends to fix the scaling issue using DPIUtil. Marcel + Julien, thank you for your energy here. Our SWT code is currently our little stepchild, needing a bit more love :) So what shall we do from here? Best if we can get Bug 1358 (in git repo already) changes and your changes (same? + windowing event) merged + tested ?! Promoted for version 2.4.0, if this can be done this week. Hello Sven, merging would be great. And yes SWT needs more love: "Doubt thou the stars are fire; Doubt that the sun doth move; Doubt truth to be a liar; But never doubt I love." William Shakespeare, Hamlet Shamelessly pasted from: https://www.goodreads.com/quotes/tag/love?page=3 (In reply to Marcel Au from comment #17) > Hello Sven, > > merging would be great. > > And yes SWT needs more love: > > "Doubt thou the stars are fire; > Doubt that the sun doth move; > Doubt truth to be a liar; > But never doubt I love." > > William Shakespeare, Hamlet > > Shamelessly pasted from: > https://www.goodreads.com/quotes/tag/love?page=3 Very nice lyrics. So how will we remove all doubts and give it some love? You or me providing the initial patch/diff file? Material love :) Hello Sven, it would be great if you could give the material love because you now the already made changes/suggestions of the Bug 1358. However for the future is this the right repo to make a pull request? https://github.com/sgothel/jogl In additon I could make a small example for SWT using the faster NEWTCanvasSWT in the Wiki(do I need a login?). I had some problems to find a SWT example and it could be useful for others. (In reply to Marcel Au from comment #0) I assume Bug 1421 comment 30 related commit does also fix this issue? > One more to fix TabFolder etc .. (Hide/Show) > > commit 39af5ca418d0db9669aca5db77fa47e801e2a1d9 > > Bug 1421 Related: Handle SWT Events: Activate (focus), Show and Hide. > > Show and Hide handling resolves TabFolder layout, > i.e. hiding the 'hidden' and showing the current tab. Also re-org all SWT related bugs - making them blocking children of Bug 674. Goal is to have most of 'em closed for 2.4.0. Resolved while working on Bug 1421. Namely Bug 1421 comment 37 and onwards (NEWT child window issue) *** This bug has been marked as a duplicate of bug 1421 *** |