fix bug where where clicking a notification while a message is displayed would lead to windowleaked