setting a graphics window as the active window