            [java.awt.event WindowListener])
   (:require [quil.util :refer [resolve-constant-key no-fn absolute-path]]
             [clojure.stacktrace :refer [print-cause-trace]]
-            [clojure.string :as string]))
+            [clojure.string :as string]
+            [clojure.set :as clj-set]))
 
 (defn applet-safe-exit
   "Sets 'finished' field in applet to true. Main run loop in applet

        looping?          (atom true)
        listeners         (into {} (for [name listeners]
                                     [name (or (options name) no-fn)]))
        applet-state      (merge options
                                 {:state state
                                  :target-obj target-obj

                                  :target :frame
                                  :safe-draw-fn true}
                                 (apply hash-map opts))

        opts              (make-hmap (filter opts-applet-params (:opts options)) true)

        options           (merge (dissoc options :opts) opts)

        decor             (:decor opts (not= :fullscreen (:size options)))
        size              (process-size (:size options))
        target            (validate-target! (:target options))
