dirty tk event-loop hack