only run these checks for buttons using the UI_BLOCK_MOVEMOUSE_QUIT flag. no functional change but makes debugging easier and was calculating mouse motion in relation to some popups for no reason.