IIUC, X11 had the same problem, but Wayland allows sandboxing to prevent this?
And MacOS has some degree of sandboxing? But many applications require "Accessibility" permission that similarly gives far too many privileges?
IIUC, X11 had the same problem, but Wayland allows sandboxing to prevent this?
And MacOS has some degree of sandboxing? But many applications require "Accessibility" permission that similarly gives far too many privileges?
I haven't run into too many applications requesting that permission, outside of desktop automation and window management tools (Hammerspoon, Magnet, etc) which need it to do their job.
What you are suggesting is overstepping 2 security boundries for unpriviledged apps/processes: 1. Reading global key presses 2. Drawing in an always-on-top window with transparent content
Both these things would require that process to get special user/compositor opt-in permissions and integration. Your best bet would be using compositor plugins/native integration, or maybe you could hook into some toolkits (this is usually what FPS overlays do, hook into the graphics APIs).
That is at least my current knowledge and there might be already some wayland extensions/XDG-portal that allows it, but not to my knowledge.
Wayland to my knowledge is isolated by default, with non-isolation being opt-in by both compositor and application via FD shenanigans, but don't quote me on the specifics.