modules/graphics/src/main/java/com/sun/glass/ui/monocle/x11/X11Screen.java

Print this page
rev 6856 : RT-36822 [Monocle] X11 framebuffer container doesn't work any more


  87                     int i = size.indexOf("x");
  88                     w = Integer.parseInt(size.substring(0, i));
  89                     h = Integer.parseInt(size.substring(i + 1));
  90                 }
  91             } catch (NumberFormatException e) {
  92                 System.err.println("Cannot parse geometry string: '"
  93                         + geometry + "'");
  94             }
  95         }
  96         long window = X.XCreateWindow(
  97                 display,
  98                 X.RootWindowOfScreen(screen),
  99                 x, y, w, h,
 100                 0, // border width
 101                 X.CopyFromParent, // depth
 102                 X.InputOutput, // class
 103                 X.CopyFromParent, // visual
 104                 cwMask,
 105                 attrs.p);
 106         X.XMapWindow(display, window);
 107         X.XStoreName(display, window, "JavaFX EGL/framebuffer container");
 108         X.XSync(display, false);
 109         int[] widthA = new int[1];
 110         int[] heightA = new int[1];
 111         int[] depthA = new int[1];
 112         X.XGetGeometry(display, window, null, null, null, widthA, heightA, null, depthA);
 113         width = widthA[0];
 114         height = heightA[0];
 115         depth = depthA[0];
 116         nativeFormat = Pixels.Format.BYTE_BGRA_PRE;
 117         nativeHandle = window;
 118     }
 119 
 120     @Override
 121     public int getDepth() {
 122         return depth;
 123     }
 124 
 125     @Override
 126     public int getNativeFormat() {
 127         return nativeFormat;




  87                     int i = size.indexOf("x");
  88                     w = Integer.parseInt(size.substring(0, i));
  89                     h = Integer.parseInt(size.substring(i + 1));
  90                 }
  91             } catch (NumberFormatException e) {
  92                 System.err.println("Cannot parse geometry string: '"
  93                         + geometry + "'");
  94             }
  95         }
  96         long window = X.XCreateWindow(
  97                 display,
  98                 X.RootWindowOfScreen(screen),
  99                 x, y, w, h,
 100                 0, // border width
 101                 X.CopyFromParent, // depth
 102                 X.InputOutput, // class
 103                 X.CopyFromParent, // visual
 104                 cwMask,
 105                 attrs.p);
 106         X.XMapWindow(display, window);
 107         X.XStoreName(display, window, "JavaFX framebuffer container");
 108         X.XSync(display, false);
 109         int[] widthA = new int[1];
 110         int[] heightA = new int[1];
 111         int[] depthA = new int[1];
 112         X.XGetGeometry(display, window, null, null, null, widthA, heightA, null, depthA);
 113         width = widthA[0];
 114         height = heightA[0];
 115         depth = depthA[0];
 116         nativeFormat = Pixels.Format.BYTE_BGRA_PRE;
 117         nativeHandle = window;
 118     }
 119 
 120     @Override
 121     public int getDepth() {
 122         return depth;
 123     }
 124 
 125     @Override
 126     public int getNativeFormat() {
 127         return nativeFormat;