1
0
Fork 0

- fixed 'stack-raise-to-top'

Swapping the  position of the window  to be raised with  the head of
  the  was a  bad  idea.   Sometimes a  windows  could  go behind  the
  omnipresent  windows (messages,  thread  etc.) and  never shown  (as
  covered by the others).
This commit is contained in:
cage 2020-09-19 19:13:45 +02:00
parent b10ba55932
commit 9895f2ef98
1 changed files with 2 additions and 5 deletions

View File

@ -79,11 +79,8 @@
(defmethod stack-raise-to-top ((object stack) val) (defmethod stack-raise-to-top ((object stack) val)
(with-accessors ((container container)) object (with-accessors ((container container)) object
(when-let ((val-position (stack-position object val)) (stack-remove object val)
(last-position (1- (length container)))) (stack-push object val)))
(misc:swap (elt container val-position)
(elt container 0)))
object))
(defmethod stack-remove ((object stack) val) (defmethod stack-remove ((object stack) val)
(with-accessors ((container container)) object (with-accessors ((container container)) object