From 55678485e8da6e98278e9bdeb7aa3935d61f3f77 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Thu, 22 Apr 2021 11:09:18 -0400 Subject: gui: Don't pick widgets that aren't visible. --- starling/gui.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 ) p) - (pick scene p (lambda (node) (is-a? node )))) + (pick scene p (lambda (node) + (and (visible? node) + (is-a? node ))))) (define-method (on-mouse-move (scene ) x y x-rel y-rel buttons) (let ((focused (mouse-focus scene)) -- cgit v1.2.3