first maximize photo viewer window and then press and hold shift key and click on close button. now next time the program should open in maximized window.