support for window and fullscreen

minor functionality for handling both fullscreen and windowed mode.