--- a/src/Pure/GUI/gui.scala Fri Jan 10 12:05:15 2014 +0100
+++ b/src/Pure/GUI/gui.scala Fri Jan 10 12:29:25 2014 +0100
@@ -43,19 +43,21 @@
def window_manager(): Option[String] =
{
- try {
- val XWM = Class.forName("sun.awt.X11.XWM", true, ClassLoader.getSystemClassLoader)
- val getWM = XWM.getDeclaredMethod("getWM")
- getWM.setAccessible(true)
- getWM.invoke(null) match {
- case null => None
- case wm => Some(wm.toString)
+ if (Platform.is_windows || Platform.is_macos) None
+ else
+ try {
+ val XWM = Class.forName("sun.awt.X11.XWM", true, ClassLoader.getSystemClassLoader)
+ val getWM = XWM.getDeclaredMethod("getWM")
+ getWM.setAccessible(true)
+ getWM.invoke(null) match {
+ case null => None
+ case wm => Some(wm.toString)
+ }
}
- }
- catch {
- case _: ClassNotFoundException => None
- case _: NoSuchMethodException => None
- }
+ catch {
+ case _: ClassNotFoundException => None
+ case _: NoSuchMethodException => None
+ }
}