Implemented ability to set window state (maximised/minimised/restored etc)