Use messaging instead of trait objects for window event handling