| Summary: | Odd Display of WindowBuilder in Eclipse 3.8/4.2 on Linux | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Lars Vogel <Lars.Vogel> | ||||||||||
| Component: | SWT | Assignee: | Bogdan Gheorghe <gheorghe> | ||||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||||
| Severity: | major | ||||||||||||
| Priority: | P3 | CC: | Alexander.Mitin, atx, ccmiersma, eclipse, gheorghe, jlangley, kai.mechel, Konstantin.Scheglov, Lars.Vogel, marc.menghin, mario.curcija, peter, pwebster, remy.suen, roman-vl, Silenio_Quarti | ||||||||||
| Version: | 3.8 | Flags: | Silenio_Quarti:
review+
|
||||||||||
| Target Milestone: | 4.2.1 | ||||||||||||
| Hardware: | PC | ||||||||||||
| OS: | Linux-GTK | ||||||||||||
| Whiteboard: | |||||||||||||
| Bug Depends on: | 354978 | ||||||||||||
| Bug Blocks: | 370370 | ||||||||||||
| Attachments: |
|
||||||||||||
(In reply to comment #0) > WindowBuilder runs fine in Eclipse 3.7 but here I also didn't get the Compiz > popup. Lars, could you try it with 3.8? It may be one of the new changes in SWT which is causing the popup to appear. Eric, possibly a reparent issue? PW @Remy: Same incorrect behavior in Eclipse 3.8. Shall I change the component to SWT? (In reply to comment #3) > @Remy: Same incorrect behavior in Eclipse 3.8. Shall I change the component to > SWT? Yes, let's send it over there. Thank you for checking, Lars, much appreciated. I investigated this today and it is directly related to our use of advanced graphics (Cairo) on GTK in 4.2. If you add the following line to the end of the eclipse.ini file before launching 4.2, things will draw properly: -Dorg.eclipse.swt.internal.gtk.useCairo=false The real fix will happen when we finish rewriting our graphics to use Cairo (bug 354978). Marking this as dependent on that. Thanks Bogdan. Workaround works fine. Happen again in Build id: I20120411-2034, this time the -Dorg.eclipse.swt.internal.gtk.useCairo=false parameter does not seem to help. (In reply to comment #7) > Happen again in Build id: I20120411-2034, this time the > > -Dorg.eclipse.swt.internal.gtk.useCairo=false > > parameter does not seem to help. Confirming that launching with -Dorg.eclipse.swt.internal.gtk.useCairo=false does not work: Eclipse SDK 4.2.0.I20120518-2145 SWT Designer 1.5.0.r42x201205152207 Add additionally org.eclipse.swt.internal.gtk.cairoGraphics=false IOW, use -Dorg.eclipse.swt.internal.gtk.cairoGraphics=false -Dorg.eclipse.swt.internal.gtk.useCairo=false Palette renderer is a Canvas widget with NO_BACKGROUND and NO_REDRAW_RESIZE styles. It uses SWT.Paint event to render palette contents. It works fine while Cairo is disabled. With Cairo, it seems that Canvas's GC draws the contents considering the coordinates provided as root window coordinates. IOW, if I try to draw something on 0,0 position of my composite, it draws contents in 0,0 position of root window. If I remove NO_BACKGROUND style, it draws correctly. So, this could be a bug in SWT. We tried the latest 4.2 RC4 build with the WindowBuilder available in the Juno repository on Ubuntu 12.04. Everything draws properly there and you don't have to set any flags. (Ubuntu 12.04 ships with GTK 2.24. If you are on another distro with GTK 2.24, you should not set any flags to false - just run as is). If you have an older distro - try "export GDK_NATIVE_WINDOWS=1" before launching eclipse. Created attachment 217087 [details]
Patch for Composite
This patch disables SWT.NO_BACKGROUND for GTK > 2.18.
This should go into 4.2.1 Created attachment 218251 [details]
Screenshot
Even with -Dorg.eclipse.swt.internal.gtk.cairoGraphics=false
-Dorg.eclipse.swt.internal.gtk.useCairo=false I get a incorrect display in the left upper corner. Screenshot attached.
(In reply to comment #11) > We tried the latest 4.2 RC4 build with the WindowBuilder available in the Juno > repository on Ubuntu 12.04. Everything draws properly there and you don't have > to set any flags. (Ubuntu 12.04 ships with GTK 2.24. If you are on another > distro with GTK 2.24, you should not set any flags to false - just run as is). > > > If you have an older distro - try "export GDK_NATIVE_WINDOWS=1" before > launching eclipse. Thank you for this tip. The option has helped me. Just in case - I use Debian Testing x64. *** Bug 385103 has been marked as a duplicate of this bug. *** export GDK_NATIVE_WINDOWS=1 eclipse -Dorg.eclipse.swt.internal.gtk.cairoGraphics=false -Dorg.eclipse.swt.internal.gtk.useCairo=false works for me. Unfortunately this seems to kill the scrollbars in Ubuntu 12.04. Patch released to 3.8 maintenance, 4.2 maintenance and master. Created attachment 220872 [details]
Bug on uses of WindowBuilder with eclipse Juno
Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError
at javax.swing.JPanel.updateUI(Unknown Source)
at javax.swing.JPanel.<init>(Unknown Source)
at javax.swing.JPanel.<init>(Unknown Source)
at javax.swing.JPanel.<init>(Unknown Source)
at javax.swing.JRootPane.createGlassPane(Unknown Source)
at javax.swing.JRootPane.<init>(Unknown Source)
at javax.swing.JFrame.createRootPane(Unknown Source)
at javax.swing.JFrame.frameInit(Unknown Source)
at javax.swing.JFrame.<init>(Unknown Source)
at HelloVE.<init>(HelloVE.java:32)
at HelloVE$1.run(HelloVE.java:20)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException: 0 incompatible with Text-specific LCD contrast key
at java.awt.RenderingHints.put(Unknown Source)
at sun.awt.windows.WDesktopProperties.getDesktopAAHints(Unknown Source)
at sun.awt.windows.WToolkit.getDesktopAAHints(Unknown Source)
at sun.awt.SunToolkit.getDesktopFontHints(Unknown Source)
at sun.awt.windows.WDesktopProperties.setDesktopAAHints(Unknown Source)
at sun.awt.windows.WToolkit.initializeDesktopProperties(Unknown Source)
at java.awt.Toolkit.getDesktopProperty(Unknown Source)
at javax.swing.UIManager.<clinit>(Unknown Source)
... 19 more
|
Created attachment 209450 [details] Screenshot I installed WindowBuilder in the latest integration build of Eclipse 4.2. As I tried to open a SWT application in SWT Designer, Eclipse prompted me something about Compiz and if it can render it into a separate Window. Unfortunately I did not note done the exact text. The palette of WindowBuilder is rendered strangely, see attached screenshot. I currently don't know if the issue is created by the Compiz Window manager, Eclipse 4.2 or Ubuntu 11.10. WindowBuilder runs fine in Eclipse 3.7 but here I also didn't get the Compiz popup. Let me know if need more information.