Restrict the condition under which paint cursors read use the cursor location from the the operating-system. This caused a glitch when dragging UI elements in painting context popup. Since the paint cursor would display using mouse motion which was clamped to the window center - an internal detail of hidden cursor grabbing. Now only read the cursor coordinates when clamped to a region which is used for the transform cursor to stay visible even when the cursor wraps around.