Fix I-beam cursor offset, caret moves to the wrong side of letters

I have Ubuntu 20.04 in a VirtualBox. In text editors (e.g. gedit, Qt Creator, etc.), the caret is placed on the wrong side of the letter when I click approximately the middle of the letter:
Screenshot and photo
(The sub-pixel layout is red on the left, green in the middle and blue on the right.)
The I-beam cursor is marked in green, the caret in red. In this case, the caret is placed to the right of the m, even though it would end up closer to the cursor if it was placed to the left. (I have not seen it the othe way around, where it is misplaced on the left.)

You might imagine how annoying this is when editing code.

Is there any way of fixing this behavior?
For example, can I change the hotspot offset of the I-beam cursor?

I am not sure that this issue is Ubuntu-specific. It might actually be caused by VirtualBox.

Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like