44

I'm troubleshooting some issues to do with multiple monitors and HiDPI on Wayland. I've learnt from online resources that applications on XWayland may not handle this use-case as expected. So now I want to know which applications are using XWayland, and which aren't.

How can I tell if an application is using XWayland or not?

Flimm
  • 43,943

1 Answers1

59

TL;DR: xlsclients

Running xlsclients in a terminal will list all the apps currently running which are using XWayland.


For fun: Use xeyes!

enter image description here

xeyes - a follow the mouse X demo

When you launch xeyes, it connects to the XWayland server and asks for the mouse position. If the mouse is currently over a window of an app that uses XWayland, XWayland knows the mouse position and can report it back to xeyes via the X11 protocol. But if the mouse is over a native Wayland client, XWayland can't get that — so the eyes will remain still even if you move your mouse.


Alt: xwininfo

Run xwininfo in a terminal window — when you hover over an xwayland window the mouse pointer will turn into a + sign. If you click the window it'll display some information and end, but it won't do anything with native Wayland windows.You can use Ctrl + C to end it.

Error404
  • 8,333
  • 17
    Okay, I officially love that xeyes hack! – marcelm Feb 18 '22 at 21:05
  • 2
    When running OBS Studio 29.0.2, xeyes and xwininfo indicate it uses XWayland but xlsclients doesn't list it. – Matthias Braun Apr 14 '23 at 11:20
  • 1
    @MatthiasBraun There is an open issue, see https://gitlab.freedesktop.org/xorg/app/xlsclients/-/issues/1 The problem is that xlsclients ignores windows without a WM_COMMAND property: https://gitlab.freedesktop.org/xorg/app/xlsclients/-/blob/xlsclients-1.1.5/xlsclients.c?ref_type=tags#L466 – mkurz Aug 01 '24 at 19:41