Deal with VIDEORESIZE events after mode changes on windows.
Merge branch 'master' into devel
Move the preferences object into preferences.py.