Chromebooks are good enough for browsing the web and playing flash games. But for programming you would need to install Linux. The HDD space on those things is pretty small (because it's solid state). So I am not sure how good it would be for programming. You can find some pretty cheap HP laptops that are decent.
I do not know if this would help, I do not use this language, But when I did the same thing in the language I use, I had to relocate the call to the function to draw the mouse to a different section of the Draw/Renderworld Loop.
Where as I had the mouse draw prior to updating the world, I had to move it to after the update/render world code and then do a page flip.
This solved my problem as it was much like yours.
Again!! I stress that I am using a different language!!