Skip to content

Commit

Permalink
Fix: wrong handling of mode parameter to applet size
Browse files Browse the repository at this point in the history
  • Loading branch information
rosado committed Sep 19, 2009
1 parent 3e4daa8 commit f2d4f26
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/rosado/processing/applet.clj
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
(update-proxy prx# ~methods)
prx#))))

(def #^{:private true}
modes {:JAVA2D JAVA2D :OPENGL OPENGL
:P3D P3D :P2D P2D :PDF PDF})

(defn run
"Launches the applet. If given the flag :interactive, it won't exit
on clicking the close button - it will only dispose the window."
Expand All @@ -43,7 +47,7 @@
(let [m (.meta applet)
[width height & mode] (or (:size m) [200 200])
mode (if-let [kw (first mode)]
(tosymb kw)
(modes (-> kw name toupper keyword))
JAVA2D)
close-op (if (first interactive?)
JFrame/DISPOSE_ON_CLOSE
Expand Down

0 comments on commit f2d4f26

Please sign in to comment.