#FEATURE by cg
class: WindowSensor
added: #flushUserEventsFor:withType:andArgument:
--- 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),