#FEATURE by cg
authorClaus Gittinger <cg@exept.de>
Wed, 19 Feb 2020 21:02:22 +0100
changeset 8994 89309ccab456
parent 8993 424fd9705378
child 8995 a54112003192
#FEATURE by cg class: WindowSensor added: #flushUserEventsFor:withType:andArgument:
WindowSensor.st
--- a/WindowSensor.st	Tue Feb 18 20:41:22 2020 +0100
+++ b/WindowSensor.st	Wed Feb 19 21:02:22 2020 +0100
@@ -1117,6 +1117,17 @@
     "Modified: / 20.6.1998 / 16:40:09 / cg"
 !
 
+flushUserEventsFor:aView withType:type andArgument:arg
+    "throw away all pending user events with specified type for aView (i.e. key & button stuff), 
+     or for any view, if the argument is nil." 
+
+    self
+        flushEventsFor:aView inQueue:mouseAndKeyboard 
+        where:[:event | (event type==type) and:[event argument=arg]]
+
+
+!
+
 flushUserEventsFor:aView withType:type withArguments:args
 
     "throw away all pending user events with specified type for aView (i.e. key & button stuff),