check grabcursorenabled value before setting grab cursor