Added fullscreen_listener function and with it the automatic resize for entering and exiting the fullscreen mode