You can because it's pointless. If you run a malicious program, it can read other process memory and all the files owned by your user. The fact that it can't read another GUI window is security theater. You've made everything a lot less useful for the user without providing any security.