There are two clipboards in X11. One is the middle-click-paste, selection clipboard that gets clobbered when you highlight something. But C-x, C-c, and C-v (in CUA applications) operate on a different clipboard altogether that doesn't exhibit this behavior.