Some more info: XSecurity allows to mark some xclients as untrusted so that they cannot grab the keyboard, send events to other clients, read the clipboard, etc. This can be useful if executing X programs as different user (using sux --untrusted) or on a different host (with ssh's -X and ForwardX11Trusted=no).