Skip to content

Windows ID returned by search function are right, while Windows ID returned by location2 or click functions are not #485

@mkostrun

Description

@mkostrun

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:

  1. xdotool getactivewindow
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions