--- zzzz-none-000/linux-2.4.17/drivers/input/mousedev.c 2001-09-30 19:26:05.000000000 +0000 +++ sangam-fb-322/linux-2.4.17/drivers/input/mousedev.c 2004-11-24 13:23:01.000000000 +0000 @@ -1,5 +1,5 @@ /* - * $Id: mousedev.c,v 1.24 2000/11/15 10:57:45 vojtech Exp $ + * $Id: mousedev.c,v 1.1.1.1 2003/06/23 22:18:27 jharrell Exp $ * * Copyright (c) 1999-2000 Vojtech Pavlik * @@ -82,6 +82,10 @@ static int xres = CONFIG_INPUT_MOUSEDEV_SCREEN_X; static int yres = CONFIG_INPUT_MOUSEDEV_SCREEN_Y; +#ifdef CONFIG_MAC_EMUMOUSEBTN +extern int mac_hid_mouse_emulate_buttons(int caller, unsigned int keycode, int down); +#endif + static void mousedev_event(struct input_handle *handle, unsigned int type, unsigned int code, int value) { struct mousedev *mousedevs[3] = { handle->private, &mousedev_mix, NULL }; @@ -137,6 +141,11 @@ case BTN_MIDDLE: index = 2; break; default: return; } + +#ifdef CONFIG_MAC_EMUMOUSEBTN + index = mac_hid_mouse_emulate_buttons(2, index, 0); +#endif + switch (value) { case 0: clear_bit(index, &list->buttons); break; case 1: set_bit(index, &list->buttons); break;