diff --git a/clim/presentations.lisp b/clim/presentations.lisp index e7f348224733ca065e66374f66f0096fb8b464a9..e61cf3270d9c10334f811bf5acdc4c29f72540e8 100644 --- a/clim/presentations.lisp +++ b/clim/presentations.lisp @@ -468,6 +468,10 @@ presentation (presentation-type presentation) history-window :highlight)))))))) +;;; NOTE Commented out the method and replaced with a single slot-value invoking version below. +;;; The behaviour of the original method is very weird. I suspect threading issues. +;;; -- jacek.zlydach 2017-06-03 +#+ (or) (defun unhighlight-highlighted-presentation (stream &optional (prefer-pointer-window t)) (let ((history-window (if prefer-pointer-window (find-appropriate-window stream) stream))) (when history-window @@ -482,6 +486,16 @@ history-window :unhighlight) (setf highlighted-presentation nil)))))) +(defun unhighlight-highlighted-presentation (stream &optional (prefer-pointer-window t)) + (let ((history-window (if prefer-pointer-window (find-appropriate-window stream) stream))) + (when history-window + (let ((highlighted-presentation (slot-value history-window 'highlighted-presentation))) + (when highlighted-presentation + (highlight-presentation + highlighted-presentation (presentation-type highlighted-presentation) + history-window :unhighlight) + (setf highlighted-presentation nil)))))) + (defun find-appropriate-window (stream) ;;--- How do we hack multiple pointers? (when (extended-input-stream-p stream)