It isn't addressed in the post and the author gets kind of defensive about it in the comments, but this is one of the things that Wayland is supposed to improve on. Each application can only communicate with the compositor about its own windows, and only has access to a buffer with it's own content.
I'm honestly not sure where we are on the adoption path for Wayland. Pretty much all of my Linux usage is command line.