| Second it is not firefox that 'pastes' when you click the middle mouse | button. It is xorg that intercepts the middle mouse click and then | sends the resulting paste to the window. So sending the middle mouse | button click to the root window or the firefox window (or any other | window) will note generate the paste event. Firefox does not know to | paste when it receives a middle mouse click.
This portion is not correct. Neither the X server nor the window manager intercept middle mouse clicks and turn them into magic paste events (or into streams of characters). Pasting is entirely handled by the program involved and Firefox really does receive a middle mouse button click event[*] and then invoke its own code to paste stuff. Programs can and do do entirely different things in response to middle mouse buttons (for example, I am writing this email in a program that does something different with it). - cks [*: actually it doesn't even get a click event; it gets a button-down and then a button-up event in very close succession. Interested parties can use 'xev' to see exactly what event streams the X server sends in various circumstances. ]