initialize the cursor into the main window