Clean event queue to prevent endless switching.
Previous patch to clear the event queue after toggle was bogus. This one
ought to do it.