Add some events for handling

Add three new events for adding / removing window and change the active window