'freeze' mouse position at drag start

I want to implement a knob control that doesn’t update the screen mouse pointer when I’m dragging with the mouse. The motivation behind this is that if I have a knob close to the top or bottom of the screen, I can only drag the value till the mouse pointer reaches the end of the screen. Ableton live works the way that when you drag the mouse (i.e. on the tempo field), the mouse stays at the same position while dragging, therefore disregarding screen limitations.
Has anyone implemented something like this in juce before?

This works pretty good for me.

void mouseDown(const MouseEvent & e) {
	e.source.enableUnboundedMouseMovement(true);
}

that one nailed it. Thank you :smiley: