Skip to content

xdo fails if the focused bspwm node is not a leaf (window).  #21

Description

@emanuele6

bspc query -N -n focused shouldn't be used to get the id focused of the focused window since it may return a node that is not a window.

But xdo id can't be used to get that id either: it fails.

How to reproduce (in bspwm):

  • go in an empty desktop;
  • open two terminals;
  • from one of terminals, run bspc node @parent -f;
  • from the same terminal, run xdo id; echo "$?" (keep the parent focused while you do it
  • the output will be the following (i.e. nothing printed, exit with 1):
    $ xdo id; echo "$?"
    1

pfw from wmutils/core works correctly: outputs the id of the focused (active) window.

xdotool getactivewindow fails exiting with 0 and printing this message to stderr:

XGetWindowProperty[_NET_ACTIVE_WINDOW] failed (code=1)
xdo_get_active_window reported an error

Since xdo is commonly used by bspwm user, I think it should work correctly in this case (like pfw).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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