]> gitweb.factorcode.org Git - factor.git/commitdiff
ui.gadgets: Stale gestures can lose the associated gadget.
authorDoug Coleman <doug.coleman@gmail.com>
Sat, 7 Mar 2020 01:05:27 +0000 (19:05 -0600)
committerDoug Coleman <doug.coleman@gmail.com>
Sat, 7 Mar 2020 01:05:27 +0000 (19:05 -0600)
The gesture queue can send messages where the
focusable-child has disappeared.

Handle ``M: f focusable-child*`` by doing nothing.

Fixes #2117.

basis/ui/gadgets/gadgets.factor

index 6338c917cb9f88fe2dfec7a522e264d7ad693005..2a81f56718f6bec85dce2d9b3ab3ce1438417e01 100644 (file)
@@ -385,6 +385,8 @@ GENERIC: focusable-child* ( gadget -- child/t )
 
 M: gadget focusable-child* drop t ;
 
+M: f focusable-child* drop f ;
+
 : focusable-child ( gadget -- child )
     dup focusable-child*
     dup t eq? [ drop ] [ nip focusable-child ] if ;