diff options
author | David Thompson <dthompson2@worcester.edu> | 2021-04-22 11:09:18 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2021-04-22 11:09:18 -0400 |
commit | 55678485e8da6e98278e9bdeb7aa3935d61f3f77 (patch) | |
tree | 1a6b37bacb638f47223cfe3d85a83a732433461b | |
parent | 0ffa5b63dfd8f652f9a0bd31be4973fc0e0ff988 (diff) |
gui: Don't pick widgets that aren't visible.
-rw-r--r-- | starling/gui.scm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/starling/gui.scm b/starling/gui.scm index f00c329..256cfd7 100644 --- a/starling/gui.scm +++ b/starling/gui.scm @@ -300,7 +300,9 @@ (keyboard-focus #:accessor keyboard-focus #:init-value #f)) (define-method (pick-widget (scene <gui-scene>) p) - (pick scene p (lambda (node) (is-a? node <widget>)))) + (pick scene p (lambda (node) + (and (visible? node) + (is-a? node <widget>))))) (define-method (on-mouse-move (scene <gui-scene>) x y x-rel y-rel buttons) (let ((focused (mouse-focus scene)) |