From 7ff8ce61dbee2c6cc3c4dd9160124cf020cc3f4a Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 9 Nov 2010 10:35:06 -0700 Subject: [PATCH] explicitly discard patseboard mouse events when not handled in universe --- collects/2htdp/private/world.rkt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/collects/2htdp/private/world.rkt b/collects/2htdp/private/world.rkt index 95e8cd13c8..6a1d772bd0 100644 --- a/collects/2htdp/private/world.rkt +++ b/collects/2htdp/private/world.rkt @@ -157,7 +157,14 @@ (pkey e:str)))))))) (define/private (deal-with-mouse %) - (if (not on-mouse) % + (if (not on-mouse) + ;; No mouse handler => discard mouse events (so snip are not selected + ;; in the pasteboard, for example + (class % + (super-new) + (define/override (on-event e) + (void))) + ;; Mouse handler => handle mouse events (class % (super-new) (define/override (on-event e)