Is there a command in Linux that can tell whether a program uses Wayland, Xorg, or Xwayland?
Not a command per se, but Sergey Bugaev shared a cool trick:
Launch xeyes and move mouse over a window. If the eyes are moving, it’s an XWayland window, otherwise it’s a native Wayland window.
xeyes is typically pre-installed in most distros. Otherwise, it can be found in the
x11-apps package or similar.
I can provide a similar answer, but the tool should already be on your system.
You can use
xprop which is most likely already available on your system. After you start the program using the terminal every X11 window will show you a crosshair, every Wayland window ignores your shoot for X11 properties.
Example on my system: on the left you can see Thunderbird drawing with X11 and left the Gnome Terminal drawing with native Wayland.