Proper handling of middle mouse event on capFourButtons and capMiddleButton
capable touchpads. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42329 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
cb2f9709c5
commit
4b722b91db
@ -96,7 +96,8 @@ enum button_ids
|
|||||||
{
|
{
|
||||||
kNoButton = 0x00,
|
kNoButton = 0x00,
|
||||||
kLeftButton = 0x01,
|
kLeftButton = 0x01,
|
||||||
kRightButton = 0x02
|
kRightButton = 0x02,
|
||||||
|
kMiddleButton = 0x04
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -123,6 +123,9 @@ get_synaptics_movment(synaptics_cookie *cookie, mouse_movement *movement)
|
|||||||
|
|
||||||
event.wValue = wValue;
|
event.wValue = wValue;
|
||||||
event.gesture = false;
|
event.gesture = false;
|
||||||
|
|
||||||
|
if (sTouchpadInfo.capMiddleButton || sTouchpadInfo.capFourButtons)
|
||||||
|
event.buttons |= ((event_buffer[0] ^ event_buffer[3]) & 0x01) << 2;
|
||||||
} else {
|
} else {
|
||||||
bool finger = event_buffer[0] >> 5 & 1;
|
bool finger = event_buffer[0] >> 5 & 1;
|
||||||
if (finger) {
|
if (finger) {
|
||||||
@ -160,6 +163,8 @@ query_capability(ps2_dev *dev)
|
|||||||
|
|
||||||
sTouchpadInfo.capExtended = val[0] >> 7 & 1;
|
sTouchpadInfo.capExtended = val[0] >> 7 & 1;
|
||||||
TRACE("SYNAPTICS: extended mode %2x\n", val[0] >> 7 & 1);
|
TRACE("SYNAPTICS: extended mode %2x\n", val[0] >> 7 & 1);
|
||||||
|
TRACE("SYNAPTICS: middle button %2x\n", val[0] >> 2 & 1);
|
||||||
|
sTouchpadInfo.capMiddleButton = val[0] >> 2 & 1;
|
||||||
TRACE("SYNAPTICS: sleep mode %2x\n", val[2] >> 4 & 1);
|
TRACE("SYNAPTICS: sleep mode %2x\n", val[2] >> 4 & 1);
|
||||||
sTouchpadInfo.capSleep = val[2] >> 4 & 1;
|
sTouchpadInfo.capSleep = val[2] >> 4 & 1;
|
||||||
TRACE("SYNAPTICS: four buttons %2x\n", val[2] >> 3 & 1);
|
TRACE("SYNAPTICS: four buttons %2x\n", val[2] >> 3 & 1);
|
||||||
|
@ -43,6 +43,7 @@ typedef struct {
|
|||||||
uint8 minorVersion;
|
uint8 minorVersion;
|
||||||
|
|
||||||
bool capExtended;
|
bool capExtended;
|
||||||
|
bool capMiddleButton;
|
||||||
bool capSleep;
|
bool capSleep;
|
||||||
bool capFourButtons;
|
bool capFourButtons;
|
||||||
bool capMultiFinger;
|
bool capMultiFinger;
|
||||||
|
Loading…
Reference in New Issue
Block a user