fix stack exhaustion error

This commit is contained in:
tilacog 2021-01-28 11:11:06 -03:00
parent a9a26a327d
commit f04a78c879

View file

@ -11,18 +11,12 @@
(defun resize-px (target current-px)
(- target current-px))
(defun balance-current-group ()
(stumpwm::balance-frames-internal (stumpwm:current-group)
(list (stumpwm::tile-group-frame-head
(stumpwm:current-group)
(stumpwm:current-head)))))
(defun resize-to-golden-ratio (to-frame from-frame)
(when (and *golden-ratio-on* (not (stumpwm::single-frame-p)))
(let* ((target-x (target-px (stumpwm::head-width (stumpwm:current-head))))
(target-y (target-px (stumpwm::head-height (stumpwm:current-head)))))
(setq *golden-ratio-on* nil)
(balance-current-group)
(stumpwm:balance-frames)
(stumpwm:resize (resize-px target-x
(stumpwm::frame-width to-frame))
(resize-px target-y