I am facing this problem: https://unix.stackexchange.com/questions/499383/xdotool-getmouselocation-and-getwindowgeometry-y-location-inconsistency
As an alternative I am thinking of a way on how to get the location of any window application in Gnome/Ubuntu 18 Desktop programmatically preferably using either Java/JNA or C++.
Is there a way to get the Window Position (X, Y) coordinate using either Java or C++, in Ubuntu 18.04.1 LTS Desktop, for any Desktop application e.g. Terminal or GEdit?
Specifically, I want to actually get the window location of either Gnome Terminal or GEdit application from a Java/C++ program.
but it is off by 6 pixels. – Artanis Zeratul Nov 24 '19 at 06:54