added option to control whether the cursor shall be displayed or not. since we dont have a non-deprecated API that can give us this information..