Improve shell.resize and shell.destroy events