invert clock flag draw detection input