woodruffw / x_do.cr

Crystal bindings for libxdo (xdotool)
https://woodruffw.github.io/x_do.cr/
MIT License
18 stars 1 forks source link

Fix `window.pid` return value #15

Closed phil294 closed 2 years ago

phil294 commented 2 years ago

PID (or 0) instead of Success/Error.

The reason the test is failing (so I still haven't activated it) is that xlogo is apparently a magic window:

$ xdotool search --name xlogo getwindowpid
> window 117440513 has no pid associated with it.

I have verified the functionality manually instead.

woodruffw commented 2 years ago

Hmm, that's interesting. What happens if you run xeyes or another builtin Xorg tool instead of xlogo?

woodruffw commented 2 years ago

(Changes LGTM, but I'd like to get the test working with xeyes or another application, if possible.)

phil294 commented 2 years ago

(Changes LGTM, but I'd like to get the test working with xeyes or another application, if possible.)

I tried many and those that were available on my official repos are xlogo xeyes xclock xbill xcalc xload xmessage xev and out of those only xclock has a PID. But with xclock, there are some BadWindow errors but only sometimes (??) idk yet

woodruffw commented 2 years ago

Okay, forget it then. I guess none of the builtins bother to set EWMH's _NET_WM_PID.