     (System/exit 0)
     true))
 
+(defn enable-full-screen!
+  "Enables full screen mode on OS X."
+  [window]
+  (try
+    (some-> (Class/forName "com.apple.eawt.FullScreenUtilities")
+            (.getMethod "setWindowCanFullScreen"
+                        (into-array Class [Window Boolean/TYPE]))
+            (.invoke nil (object-array [window true])))
+    (catch Exception _)))
+
 (defn create-window
   "Creates the main window."
   []

            [nightmod.core.ui :as ui]
            [nightmod.core.utils :as utils]
            [seesaw.core :as s])
  (:import [java.awt BorderLayout Canvas Dimension]
           [java.awt.event ComponentAdapter WindowAdapter]
           [javax.swing JLayeredPane]
           [com.badlogic.gdx.backends.lwjgl LwjglApplication]

          ;87 (editors/close-selected-editor!)
          ; else
          false)))
    ; set various window properties
    enable-full-screen!
    (.addWindowListener (proxy [WindowAdapter] []
                          (windowClosing [e]
                            (confirm-exit-app!))))))
