Disabled refresh when application is focused

Fixed #1259

TBR: @devoncarew