Move dock event filter to main class