diff options
author | David Thompson <dthompson2@worcester.edu> | 2023-05-13 21:02:25 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2023-05-13 21:02:25 -0400 |
commit | 4d754131006679ebe3314df600c2cc1760335dcd (patch) | |
tree | 897f9a703e717655b6e0b23bba16c2406544b828 /catbird/overlay.scm | |
parent | 10e3c697b33d65f9be84c73ffae70edc4a074fdd (diff) |
Handle window resizing in a somewhat reasonable way.
Diffstat (limited to 'catbird/overlay.scm')
-rw-r--r-- | catbird/overlay.scm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/catbird/overlay.scm b/catbird/overlay.scm index 2833e87..1cdabd4 100644 --- a/catbird/overlay.scm +++ b/catbird/overlay.scm @@ -70,6 +70,11 @@ (lambda (exception stack) (handle-error overlay exception stack)))) +(define-method (on-region-resize (overlay <overlay>)) + (let ((repl (child-ref overlay 'repl)) + (region (car (regions overlay)))) + (when repl (resize-repl repl (width region) (height region))))) + (define-method (notify (scene <overlay>) message) (run-script scene (let* ((padding 8.0) |