Jacob Burckhardt writes:
1. Create a new buffer and insert the text "ab".
2. Type C-x 52 to create a new frame.
3. Now there are two frames and each frame has the point after the
letter "b".
4. In one frame, drag the mouse over the "a" so that only "a" is
highlighted.
5. Move the mouse over the other frame, but do not type or click any
buttons in the frame.
6. Move the mouse into an xterm window.
7. Click the middle button.
It will paste "ab" into the xterm, but since you only highlighted the
letter "a", it should have pasted only "a".
Easily reproducible. The problem is that the selection is stored
as the region between the buffer's point marker and the buffer
mark. It uses the buffer's real point marker, not a copy, so
when point changes the selection changes. This is good if the
buffer is only displayed in one window, but loses if the buffer
is displayed in multiple windows because selecting the buffer in
a different window assigns the new window's window-point value
to the buffer's point marker, changing the selection region.
The fix should probably be to remember more information about
selection, such as the selected window at the time the selection
was owned. Then the currect window's point value could be used
at paste time. But this has consequences for zmacs-regions.