News for hackers. Stuff that matters.
Re:AutoHotKey V2 (Breaking Upgrade) by phil294 on Thursday January 05, 2023 @08:07AM (#34259092)
Thanks for the helpful summary. Capturing key presses could also work by talking to the kernel directly.

> There is currently no protocol, stable or unstable, for programs to implicitly grab the content of surfaces under the pointer, let alone read text of textboxes.

Yes there is, AtSpi, the accessibility protocol. But a normal window-independent `Click, X, Y` would indeed be quite important to have...

I'm wondering if there is a way to somehow get active window position, move windows around etc. using root privileges, without relying on a custom compositor extension. Could not find anything.

Re:AutoHotKey V2 (Breaking Upgrade) by Arnavion on Thursday January 05, 2023 @01:16PM (#34264039)
>Yes there is, AtSpi, the accessibility protocol.

Right, "protocol" in my comment meant "Wayland protocol".

>I'm wondering if there is a way to somehow get active window position, move windows around etc. using root privileges

Root doesn't matter, because the compositor isn't running as root either. ie being root won't give you any more privileges over it that just being the same user doesn't.

Things like "active window position", "move windows around", and even the entire concept of "windows" are internal to the compositor. Wayland only talks about surfaces; what the compositor does with those surfaces is up to the compositor. It might display them as windows, or as sides of a 3-D rotating cube, or print them through a printer. So you're not going to get that information from anywhere other than the compositor.