1
0
Fork 0

- [gemini] rendered again the focus mark when a gemini stream has ended.

This commit is contained in:
cage 2022-03-11 20:50:06 +01:00
parent a34cc83df5
commit baffa09093
4 changed files with 15 additions and 9 deletions

View File

@ -370,6 +370,10 @@
(maybe-render-toc () (maybe-render-toc ()
(when (eq (stream-status wrapper-object) :rendering) (when (eq (stream-status wrapper-object) :rendering)
(ui:open-gemini-toc))) (ui:open-gemini-toc)))
(maybe-render-focus-mark ()
(when (eq (stream-status wrapper-object) :rendering)
(program-events:with-enqueued-process ()
(windows:draw-focus-mark *message-window*))))
(maybe-render-links () (maybe-render-links ()
(when (eq (stream-status wrapper-object) :rendering) (when (eq (stream-status wrapper-object) :rendering)
(program-events:with-enqueued-process () (program-events:with-enqueued-process ()
@ -448,6 +452,7 @@
(progn (progn
(maybe-render-toc) (maybe-render-toc)
(maybe-render-links) (maybe-render-links)
(maybe-render-focus-mark)
(ui:notify (_ "Gemini document downloading completed")) (ui:notify (_ "Gemini document downloading completed"))
(setf (stream-status wrapper-object) :completed) (setf (stream-status wrapper-object) :completed)
(when (and fragment (when (and fragment

View File

@ -218,13 +218,10 @@
(slowness 15)) (slowness 15))
(declare (fixnum index frames slowness)) (declare (fixnum index frames slowness))
(defun draw-downloading-animation (window) (defun draw-downloading-animation (window)
(declare (optimize (debug 0) (speed 2))) (declare (optimize (debug 0) (speed 3)))
(let* ((animation-frames (swconf:gemini-downloading-animation)) (let* ((animation-frames (swconf:gemini-downloading-animation))
(max (length (the list animation-frames)))) (max (length (the list animation-frames))))
(print-text window (print-text window (elt animation-frames index) 0 0 :attributes (attribute-bold))
(elt animation-frames index)
0 0
:attributes (attribute-bold))
(incf frames) (incf frames)
(when (= (rem frames slowness) (when (= (rem frames slowness)
0) 0)

View File

@ -1824,6 +1824,7 @@
:focus-marked-window :focus-marked-window
:in-focus :in-focus
:in-focus-p :in-focus-p
:draw-focus-mark
:border-window :border-window
:uses-border-p :uses-border-p
:usable-window-width :usable-window-width

View File

@ -716,11 +716,14 @@ insetred by the user"
(setf (focus-mark object) (setf (focus-mark object)
(make-tui-string value :fgcolor fg :bgcolor bg)))) (make-tui-string value :fgcolor fg :bgcolor bg))))
(defmethod draw :after ((object focus-marked-window)) (definline draw-focus-mark (window)
(with-accessors ((in-focus-p in-focus-p) (with-accessors ((in-focus-p in-focus-p)
(focus-mark focus-mark)) object (focus-mark focus-mark)) window
(when (in-focus-p object) (when (in-focus-p window)
(print-text object focus-mark 0 0)))) (print-text window focus-mark 0 0))))
(defmethod draw :after ((object focus-marked-window))
(draw-focus-mark object))
(defclass border-window () (defclass border-window ()
((uses-border-p ((uses-border-p