*** This is critical bug that need to be fixed before the new prism-es2 (es2n) is fully functional ***
Glass currently creates transparent window without using the VisualID passed in by Prism. This broke the contract between Prism and Glass, and causes user program with transparent Stage to crash. Since the VisualID use in Prism (es2n) is alpha channel capable, Glass should simply use it. The fix in Glass maybe as simple as the change:
--- a/glass/glass-mat-lib-gtk/src/com/sun/glass/ui/glass_gtkcompat.c Tue May 08 14:55:17 2012 -0700
+++ b/glass/glass-mat-lib-gtk/src/com/sun/glass/ui/glass_gtkcompat.c Wed May 09 15:20:49 2012 -0700
@@ -310,6 +310,7 @@
static gboolean
configure_window_transparency(GtkWidget *window, gboolean transparent) {
+/*
if (transparent) {
if (configure_transparent_window(window)) {
return TRUE;
@@ -319,8 +320,13 @@
" support alpha channel."
" You need to enable XComposite extension.\n");
}
+*/
+ configure_opaque_window(window);
- configure_opaque_window(window);
- return FALSE;
+ if (transparent) {
+ fprintf(stderr, "Need to clear the alpha channel of transparent window\n");
+ }
+
+ return TRUE;
}
Glass currently creates transparent window without using the VisualID passed in by Prism. This broke the contract between Prism and Glass, and causes user program with transparent Stage to crash. Since the VisualID use in Prism (es2n) is alpha channel capable, Glass should simply use it. The fix in Glass maybe as simple as the change:
--- a/glass/glass-mat-lib-gtk/src/com/sun/glass/ui/glass_gtkcompat.c Tue May 08 14:55:17 2012 -0700
+++ b/glass/glass-mat-lib-gtk/src/com/sun/glass/ui/glass_gtkcompat.c Wed May 09 15:20:49 2012 -0700
@@ -310,6 +310,7 @@
static gboolean
configure_window_transparency(GtkWidget *window, gboolean transparent) {
+/*
if (transparent) {
if (configure_transparent_window(window)) {
return TRUE;
@@ -319,8 +320,13 @@
" support alpha channel."
" You need to enable XComposite extension.\n");
}
+*/
+ configure_opaque_window(window);
- configure_opaque_window(window);
- return FALSE;
+ if (transparent) {
+ fprintf(stderr, "Need to clear the alpha channel of transparent window\n");
+ }
+
+ return TRUE;
}
- blocks
-
JDK-8101235 Rewrite prism-es2 pipeline to not use OpenGL bindings
- Closed