Suggestion for Xorg / about middle-mouse click pasting
Sam Varshavchik
sam.varshavchik at gmail.com
Thu Jul 30 23:16:04 UTC 2020
On Thu, Jul 30, 2020 at 3:06 PM Elie Goldman Smith
<elie.goldman.smith at gmail.com> wrote:
> Countless people on forums say that middle-mouse pasting is an X11 feature.
"X11" is not the same thing as an "X server".
> This document seems to confirm that it's an X11 feature:
> https://www.jwz.org/doc/x-cut-and-paste.html
Yes, it does. This document confirms that middle mouse button click
events are X11 features.
Pay attention to this part:
# So how do I implement this?
#
# middle button paste, if implemented | Retrieve and insert PRIMARY selection.
Pay attention to the "if implemented" part. If not implemented, this
does nothing.
An X client chooses to implement whatever events it wants. If it
chooses to implement the middle button as a paste button, it then
proceeds to retrieve and insert the PRIMARY selection from the server.
If it chooses not to do so, nothing happens. The X server has
absolutely nothing to do, whatsoever. The X server's only
responsibility is to forward mouse button events to the client, to do
whatever it wants with it. If the client chooses to implement the
middle button as a paste operation, that's the client's choice. Not
the server's.
Feel free to read
https://www.x.org/releases/X11R7.7/doc/xproto/x11protocol.html
at your leisure, for all the details.
>
>
> Please correct me if I'm wrong.
>
>
> On Friday, July 24, 2020, Alan Coopersmith <alan.coopersmith at oracle.com> wrote:
>>
>> On 7/23/20 1:19 AM, Elie Goldman Smith wrote:
>>>
>>> Solution:
>>> Middle-mouse pasting would be great as a setting that can be enabled/disabled by 'xset' on the command line.
>>>
>>> Please let me know if this would be simple to implement.
>>
>>
>> It would not be, because it is not a X server behavior. It is simply
>> a convention implemented in dozens of toolkits and thousands of
>> applications, with no centralized control.
>>
>> All the X server does is tell the client that button 2 was pressed, and
>> everything after that happens client side.
>>
>> --
>> -Alan Coopersmith- alan.coopersmith at oracle.com
>> Oracle Solaris Engineering - https://blogs.oracle.com/alanc
>
> _______________________________________________
> xorg at lists.x.org: X.Org support
> Archives: http://lists.freedesktop.org/archives/xorg
> Info: https://lists.x.org/mailman/listinfo/xorg
> Your subscription address: %(user_address)s
More information about the xorg
mailing list