                                 
 
 (defn handle-wheel [component z-atom]
-  (.addMouseWheelListener component
-    (proxy [MouseAdapter] []
-      (mouseWheelMoved [e]
-                       (swap! z-atom update-in [:z]
-                              + (.getWheelRotation e)))))
-  z-atom)
+  (let [last-move (atom 0)]
+    (def lm last-move)
+    (.addMouseWheelListener component
+      (proxy [MouseAdapter] []
+        (mouseWheelMoved [e]
+          (let [t (System/currentTimeMillis)]
+            (when (< 250 (- t @last-move))
+              (reset! last-move t)
+              (swap! z-atom update-in [:z]
+                     (if (pos? (.getWheelRotation e)) inc dec))))))))
+    z-atom)
 
 (defn handle-resize [component size-atom]
   (let [update-size #(let [bounds (.getBounds component)]

    (.show window)))

(defn exit-full-screen!
  [window]
  (when window
    (.dispose window)
    (.setUndecorated window false)
    (when (JavaUtils/isMac)
      (.setFullScreenWindow (window-screen window) nil))
    (when-let [bounds (@old-bounds window)]
      (.setBounds window bounds)
      (swap! old-bounds assoc window nil))
    (.repaint window)
    (.show window)))


(def old-bounds (atom {}))

(defn full-screen!
  "Make the given window/frame full-screen."
  [window]
  (when (and window (not (@old-bounds window)))
    (when-not (@old-bounds window)
      (swap! old-bounds assoc window (.getBounds window)))
    (.dispose window)
