Any process that can connect to the X server has complete control over all other apps running on it and can record all user activity.
It can also pop up an xterm and type ‘kill’ into it.
Not that this isn’t poor design though, but it’s the best one can do.