Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8115085

Gtk: Glass should honor the contract of only use the VisualID, passed in from Prism, to create window

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 7u6
    • 7u6
    • javafx
    • Linux

      *** 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;
       }

            anthony Anthony Petrov (Inactive)
            ckyang Chien Yang (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: