 
                             ;; My child request focus and I throw focus - then I let this child get focus
                             :throws-focus (focus-child child-id))
+
           :throws-focus (case child-throw-mode
                           ;; My child throws focus in :prev direction. Give focus to previous child.
                           ;; But if I'm not a closed root then there may be no previous child,

        ;; Otherwise my parent has focus permanently and my state is clean
        :has-focus (if (= parent-focused-child (:id component)) ; This condition means that parent has focus temporarily
                     ;; Parent keeps latest throwing direction in :throw-mode in this case. Track it for further use
                     (assoc having-focus-state :throw-mode (:throw-mode parent-focus-state))
                     clean-state)
        ;:has-focus clean-state
        :none clean-state
        :parent-of-focused (if (= parent-focused-child (:id component))
                             ;; If my parent is :parent-of-focused and I am :parent-of-focused,

(def clean-state {:mode :none
                  :focused-child nil})

(defn having-focus-state [component comment]
  (do
    (fg/log-debug "Permanent focus (" comment ") received by" (:id component))
    {:mode :has-focus
     :focused-child nil}))

(defn temporarily-taken-from-state [component comment permanent-owner-child dir]
  (do
    (fg/log-debug "Temporary focus (" comment ") from" permanent-owner-child "received by" (:id component))
    {:mode :has-focus
     :focused-child permanent-owner-child
     :throw-mode dir}))

(defn focus-child [child-id]
  (if (keyword? child-id)
