| Summary: | DBCS4.2: Shell.setAlpha() does not work on Linux-GTK (a common bug) | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Masaihko Maedera <maedera> |
| Component: | SWT | Assignee: | Platform-SWT-Inbox <platform-swt-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | arunkumar.thondapu, bsd, camle, dejuknow, ericwill, harendra, kennoji, maedera, Silenio_Quarti |
| Version: | 4.2 | Keywords: | triaged |
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
Tried this and it works for me on Ubuntu Linux 11.04 with Eclipse Juno RC1 (default locale). Can you please try with a recent Eclipse build? Which version of GTK is being used on your machine? I'm seeing this with 4.3M6 on RHEL 6. $ uname -a Linux lgclinux 2.6.32-279.19.1.el6.x86_64 #1 SMP Sat Nov 24 14:35:28 EST 2012 x86_64 x86_64 x86_64 GNU/Linux $ rpm -q -a | grep -i cairo cairo-devel-1.8.8-3.1.el6.x86_64 cairo-1.8.8-3.1.el6.x86_64 pycairo-1.8.6-2.1.el6.x86_64 cairo-1.8.8-3.1.el6.i686 cairomm-1.8.0-2.1.el6.x86_64 The docs for gtk_widget_is_composited says: On X11 this function returns whether a compositing manager is running for widget's screen. (https://developer.gnome.org/gtk3/stable/GtkWidget.html#gtk-widget-is-composited) And metacity doesn't seem to be a compositing manager. There is a platform inconsistency here and that is that the Shell has to be already opened, before calling setAlpha(). This is a pretty common issue in GTK, and it would be more headache than its worth to fix it. |
Build Identifier: I20120503-1800 Description: Shell.setAlpha() does not work expectedly on Linux-GTK. It does not make shell tranparent to the background. OS: Red Hat Linux 6.2 JDK: JRE 1.7.0 IBM Locale:Japanese This is not a bug specific to DBCS and Japanese. This is a common bug on Linux-GTK. Reproducible: Always Steps to Reproduce: 1. Prepare a Java project using SWT jars. 2. Copy the source code below to your Java project. 3. Run the code and confirm the shell is not transparent. 4. This happens on Linux. it does not happen on Windows 7. --------------------------- import org.eclipse.swt.widgets.*; public class TransparentTest { public static void main(String[] args) { Display display = new Display(); Shell shell = new Shell(display); shell.setText("Transparent Test"); shell.setAlpha(157); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); } } ---------------------------