From 6c90da78f9f94e43e5afb0f6e3c0659b6e0318ba Mon Sep 17 00:00:00 2001 From: David Botton Date: Wed, 17 Feb 2021 17:41:46 -0500 Subject: [PATCH] Focus tweaks --- source/clog-gui.lisp | 3 ++- tutorial/22-tutorial.lisp | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/source/clog-gui.lisp b/source/clog-gui.lisp index 4716d34..de3a3a6 100644 --- a/source/clog-gui.lisp +++ b/source/clog-gui.lisp @@ -391,7 +391,8 @@ The on-window-change clog-obj received is the new window")) (setf (current-win app) obj) (when (on-window-change app) (funcall (on-window-change app) obj)) - (fire-on-window-focused obj)) + (when obj + (fire-on-window-focused obj))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Implementation - Individual Windows diff --git a/tutorial/22-tutorial.lisp b/tutorial/22-tutorial.lisp index 9fd40d3..ee587a4 100644 --- a/tutorial/22-tutorial.lisp +++ b/tutorial/22-tutorial.lisp @@ -36,8 +36,11 @@ (path-fill cx))) (defun on-file-movies (body) - (let ((win (create-gui-window body :title "Movie"))) - (create-video (window-content win) :source "https://www.w3schools.com/html/mov_bbb.mp4"))) + (let* ((win (create-gui-window body :title "Movie")) + (movie (create-video (window-content win) + :source "https://www.w3schools.com/html/mov_bbb.mp4"))) + (setf (box-width movie) "100%") + (setf (box-height movie) "100%"))) (defun on-file-pinned (body) (let ((win (create-gui-window body :title "Pinned"