Get X/Y position of caret (input text cursor) under Xorg?
问题 I'd like to display a popover right above where the user is typing, in any Linux app (GTK, Qt, Electron, etc.), running on X. I figured out creating the popover, now I'm trying to figure out how to get the coordinates of the input text cursor (what blinks while you type, not sure if it's called "caret"?) relative to the screen. I know I can get info on where the mouse with xdotool : xdotool getmouselocation I would need the same thing but for the text cursor, in the currently focused window.