# HG changeset patch # User Claus Gittinger # Date 1582142542 -3600 # Node ID 89309ccab456167af70f12e7b5ffd627ecf75dc1 # Parent 424fd97053789294ed438d9c6328225964153fd8 #FEATURE by cg class: WindowSensor added: #flushUserEventsFor:withType:andArgument: diff -r 424fd9705378 -r 89309ccab456 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),