make sure the "closed" event comes. It will not come from the C backend, so we generate it in the racket-webview-qt.rkt module"

This commit is contained in:
2026-04-30 23:16:41 +02:00
parent c2db35c6fc
commit 41cd0021b0
3 changed files with 11 additions and 6 deletions
+8 -1
View File
@@ -746,7 +746,14 @@
(define (rkt-webview-close handle)
(rkt_webview_close (rkt-wv-win handle))
;(enqueue! (rkt-wv-evt-queue handle) 'quit)
(let ((evt-cb (hash-ref evt-cb-hash (rkt-wv-win handle) (λ args #t))))
(let ((evt (format
(string-append "{ \"event\": \"closed\", "
" \"elaped\": -1.0, "
" \"evt-id\": -98832, "
" \"timestamp\": ~a }")
(current-milliseconds))))
(evt-cb evt)))
(set-rkt-wv-valid! handle #f)
(hash-remove! evt-cb-hash (rkt-wv-win handle))
(hash-remove! rkt-wv-store (rkt-wv-win handle))