changeset 8006:55914cd82ec8

RT-38673 [Monocle] Fall back to headless screen if we cannot access the framebuffer
author Daniel Blaukopf <daniel.blaukopf@oracle.com>
date Tue, 16 Sep 2014 17:43:48 +0300
parents 485cc6e5a142
children 887985e5611d
files modules/graphics/src/main/java/com/sun/glass/ui/monocle/LinuxPlatform.java
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/modules/graphics/src/main/java/com/sun/glass/ui/monocle/LinuxPlatform.java	Tue Sep 16 15:04:33 2014 +0200
+++ b/modules/graphics/src/main/java/com/sun/glass/ui/monocle/LinuxPlatform.java	Tue Sep 16 17:43:48 2014 +0300
@@ -44,6 +44,10 @@
 
     @Override
     protected NativeScreen createScreen() {
-        return new FBDevScreen();
+        try {
+            return new FBDevScreen();
+        } catch (RuntimeException e) {
+            return new HeadlessScreen();
+        }
     }
 }