There is a draft of xdg-foreign protocol extension, which allows to obtainobtaining handles of wl_surface's, created by other Wayland clients. Having the handle, you can obtain from it anything you can obtain from surfaces of your client. However, this protocol still has limitations:
- Obviously, it won't work if not implemented in clients.
- It's targeted for clients that "know"know each other, so it does not provide a way to trigger it: your client communicates with a foreign client client in some way, not covered by the extension, then. Then the foreign client publishes publishes a handle for your client via this extesionextension.
- It gains too much control, if compared to
xprop. Actually, you can even draw on foreign surfaces!
So, this willis unlikely to become a general way to get surface parameters from any client by any client. But don't lose a hope: there are a lot of an examples in tech history when a technology, initially designed for some purpose, became widely used for other purposepurposes, just like car cigarette lighters or AccesibilityAccessibility APIs in Android. Moreover, in the future, there may appear a protocol extension that is more suited for your task, as there is definitely a need for it (for example, for time trackers).