2

How do I enumerate all top level windows on the desktop (and further fetching its titles and other properties) on Ubuntu 17.10 using the new default display server Wayland?

Before we used X11 / XLib to achieve this, but now with Wayland this does not work reliable any more. Some windows, like gedit and LibreOffice do not show up any more in the window list, and other tools like xwininfo also do not work any more with these windows.

Currently we use the following technologies:

Ubuntu 17.04 with X.org as default display server:

  • X11-XLib / X_QueryTree

Windows:

  • Win32-API / EnumerateWindows (there also exists Windows Automation API)

macOS:

  • NSAccessibility / AXUIElementCreateApplication, AXUIElementCopyAttributeValue, kAXChildrenAttribute

Ubuntu 17.10 with Wayland:

  • ???

I have not found any API documentation about Wayland and accessibility or UI automation so far.

Can anybody help? A future-proof solution/technology how to access desktop windows on Linux/Ubuntu would be nice.

Regards.

jww
  • 97,681
  • 90
  • 411
  • 885
dominik
  • 151
  • 1
  • 2
  • 13
  • Closely related: https://stackoverflow.com/questions/45465016/how-do-i-get-the-active-window-on-gnome-wayland – Glyph Jan 27 '18 at 04:00

1 Answers1

0

Actually, I think you don't. Wayland is designed in the way that clients don't know about each other. There may be a special API in that specific Wayland composer you are using - but its not part of the protocol. (E.g. GNOME's composer has a DBus API to capture screens)

Florian Zwoch
  • 6,764
  • 2
  • 12
  • 21