ui.gadgets: Stale gestures can lose the associated gadget.

The gesture queue can send messages where the
focusable-child has disappeared.

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

Fixes #2117.
master
Doug Coleman 2020-03-06 19:05:27 -06:00
parent 8da5c2fc91
commit 97532d020a
1 changed files with 2 additions and 0 deletions

View 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 ;