          (windowExitingFullScreen [_])
          (windowExitedFullScreen [_]
            (swap! fullscreen-windows disj window)))))
-    (constantly nil)))
 
 (defn setup-fullscreen
   "Endows the given window with the ability to enter and exit full screen.

      (exit-full-screen! window)
      (full-screen! window))))

(defn attempt-eval [form default]
  (try
    (eval form)
    (catch Throwable _ default)))

(def new-mac-enable-full-screen
  (attempt-eval
    '(fn [window]
       (FullScreenUtilities/setWindowCanFullScreen window true)
       (FullScreenUtilities/addFullScreenListenerTo window
         (proxy [FullScreenAdapter] []


(def old-bounds (atom {}))

(attempt-defn mac-new-toggle-full-screen
  [window]
  (.requestToggleFullScreen
    (Application/getApplication) window))

(defn full-screen!
  "Make the given window/frame full-screen."
