flush enqueued help-activation event when we leave a view
authorClaus Gittinger <cg@exept.de>
Thu, 10 Jan 2008 13:50:22 +0100
changeset 2371 4ab6c8c7bc03
parent 2370 df26f620fae4
child 2372 abd41b275bee
flush enqueued help-activation event when we leave a view (avoids ugly help-views to pop up for the previous view, when the mouse is moved out of a view after staying there fore a while, but before the help is actually shown; i.e. when the show-help is enqueued, but no help-display process has been started yet)
ActiveHelp.st
--- a/ActiveHelp.st	Wed Jan 09 18:59:04 2008 +0100
+++ b/ActiveHelp.st	Thu Jan 10 13:50:22 2008 +0100
@@ -9,8 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
-
 "{ Package: 'stx:libview2' }"
 
 EventListener subclass:#ActiveHelp
@@ -384,9 +382,15 @@
     ^ false
 !
 
-pointerLeave:state view:view
+pointerLeave:state view:aView
     "handle pointer leaving a view; hide help text"
 
+    |sensor|
+
+    sensor := aView sensor.
+    sensor notNil ifTrue:[
+        sensor flushEventsFor:self withType:#initiateHelpFor:at:.
+    ].
     self hideHelpIgnoringErrors.
     ^ false
 ! !
@@ -690,7 +694,7 @@
 !ActiveHelp class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/ActiveHelp.st,v 1.58 2006-03-20 13:53:19 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/ActiveHelp.st,v 1.59 2008-01-10 12:50:22 cg Exp $'
 ! !
 
 ActiveHelp initialize!