py,st3m: Only reset display mode when fully exiting an app
Otherwise it may get changed behind the application's back when moving forward in the view stack.
Otherwise it may get changed behind the application's back when moving forward in the view stack.