Map logical to physical mouse button events
authorRoland Kaufmann <rlndkfmn+freerdp@gmail.com>
Mon, 13 Jul 2015 20:59:18 +0000 (22:59 +0200)
committerRoland Kaufmann <rlndkfmn+freerdp@gmail.com>
Tue, 15 Dec 2015 16:42:05 +0000 (17:42 +0100)
commit6ca89620452fc36b17cf01ed283d3ccf00594e6b
tree37f226981891587dfe3168d3a2f7dc92f9024b3c
parent1b177fa735d441d55a8839b0efb999905559f670
Map logical to physical mouse button events

RDP expects to receive an indicator of the physical mouse button that
was pressed on the client, whereas X11 deliver a value for which
logical mouse button that was pressed.

This patch introduces a (reverse) mapping from logical mouse buttons to
physical mouse buttons, so that the RDP server can do correct mapping
for the event on its end.

However, no actual mapping is done here; this patch just introduces the
framework to do so. Thus, there should be no behavioural change from
this patch alone.

There is an implicit assumption that only the first three buttons are
mapped to eachother. Enabling more a general mapping would require
extensive changes to the event handling as fourth logical button and
up is used for special functionality such as wheel.
client/X11/xf_client.c
client/X11/xf_event.c
client/X11/xfreerdp.h