Set focus state correctly in Canvas