Title says it all.
Windows ID's returned by xdo_search_windows(...) or xdo_get_active_window() are mutually identical and correct ones, while the ID's returned by xdo_get_mouse_location2(...) or xdo_select_window_with_click(...) are also mutually identical ones but different from the Window ID returned by the first group of functions.
Window manipulation functions behave properly only if the window ID from the first group of functions is given to them. For the window ID's from the second group they return X-errors.
For example, if one wants to activate a window, its ID should be found through _search() or _active() functions.
One way to test this issue is to run xdotool with two ways:
- xdotool getactivewindow
- xdotool selectwindow
and then click on the shell window in which the xdotool is running
In theory, both should give the same ID, but they do not. Use getactivewindow one as the right one.