{"record":{"id":"33ff02b87574d49b","repo":"java-native-access/jna","slug":"window-graphicsconfiguration-w-getgraphicsconfiguration-does","errorCode":null,"errorMessage":"Window GraphicsConfiguration '\" + w.getGraphicsConfiguration() + \"' does not support transparency","messagePattern":"Window GraphicsConfiguration '\" \\+ w\\.getGraphicsConfiguration\\(\\) \\+ \"' does not support transparency","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"contrib/platform/src/com/sun/jna/platform/WindowUtils.java","lineNumber":1953,"sourceCode":"\n                x11.XFree(image.getPointer());\n                x11.XFreeGC(dpy, gc);\n                x11.XCloseDisplay(dpy);\n            }\n        }\n\n        @Override\n        public void setWindowTransparent(final Window w,\n                                         final boolean transparent) {\n            if (!(w instanceof RootPaneContainer)) {\n                throw new IllegalArgumentException(\"Window must be a RootPaneContainer\");\n            }\n            if (!isWindowAlphaSupported()) {\n                throw new UnsupportedOperationException(\"This X11 display does not provide a 32-bit visual\");\n            }\n            if (!w.getGraphicsConfiguration()\n                .equals(getAlphaCompatibleGraphicsConfiguration())) {\n                throw new IllegalArgumentException(\"Window GraphicsConfiguration '\" + w.getGraphicsConfiguration() + \"' does not support transparency\");\n            }\n            boolean isTransparent = w.getBackground() != null\n                && w.getBackground().getAlpha() == 0;\n            if (transparent == isTransparent)\n                return;\n            whenDisplayable(w, new Runnable() {\n                @Override\n                public void run() {\n                    JRootPane root = ((RootPaneContainer)w).getRootPane();\n                    JLayeredPane lp = root.getLayeredPane();\n                    Container content = root.getContentPane();\n                    if (content instanceof X11TransparentContentPane) {\n                        ((X11TransparentContentPane)content).setTransparent(transparent);\n                    }\n                    else if (transparent) {\n                        X11TransparentContentPane x11content =\n                            new X11TransparentContentPane(content);\n                        root.setContentPane(x11content);","sourceCodeStart":1935,"sourceCodeEnd":1971,"githubUrl":"https://github.com/java-native-access/jna/blob/d036ad9781adad4b66693e8fa7098e4ac665e0a3/contrib/platform/src/com/sun/jna/platform/WindowUtils.java#L1935-L1971","documentation":"Guard exception in the X11 setWindowTransparent path: it fires when the window's GraphicsConfiguration does not expose a translucency-capable 32-bit visual, so the window cannot be made transparent on this display. The fault is the window/display configuration, not the 'transparent' flag argument.","triggerScenarios":"Thrown at contrib/platform/src/com/sun/jna/platform/WindowUtils.java:1953 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check isWindowAlphaSupported() and GraphicsConfiguration.isTranslucencyCapable() before calling setWindowTransparent","Create the window on a translucency-capable GraphicsConfiguration (select a 32-bit visual at frame creation)","Skip transparency on displays lacking a compositing manager / 32-bit visuals"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"d036ad9781adad4b66693e8fa7098e4ac665e0a3","analyzedAt":"2026-09-12T06:50:59.239Z","contentChangedAt":"2026-09-12T06:50:59.239Z","schemaVersion":2},"datasetVersion":"2026-09-19T12:17:13.211Z"}