Lines Matching +full:button +full:- +full:191

2  ** SPDX-License-Identifier: BSD-4-Clause
82 /* Abort 3-button emulation delay after this many movement events. */
88 #define MOUSE_XAXIS (-1)
89 #define MOUSE_YAXIS (-2)
114 #define tsclr(tvp) ((tvp)->tv_sec = (tvp)->tv_nsec = 0)
116 (((tvp)->tv_sec == (uvp)->tv_sec) ? \
117 ((tvp)->tv_nsec cmp (uvp)->tv_nsec) : \
118 ((tvp)->tv_sec cmp (uvp)->tv_sec))
121 (vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec; \
122 (vvp)->tv_nsec = (tvp)->tv_nsec - (uvp)->tv_nsec; \
123 if ((vvp)->tv_nsec < 0) { \
124 (vvp)->tv_sec--; \
125 (vvp)->tv_nsec += 1000000000; \
273 /* Logitech MouseMan (new 4 button model) */
381 (CS8 | CREAD | HUPCL ), /* GTCO Digi-Pad */
392 int zmap[4]; /* MOUSE_{X|Y}AXIS or a button number */
393 int wmode; /* wheel mode button number */
400 long button2timeout; /* 3 button emulation timeout */
415 .level = -1,
421 .mfd = -1,
422 .cfd = -1,
423 .mremsfd = -1,
424 .mremcfd = -1,
438 /* button status */
441 struct timespec ts; /* timestamp on the last button event */
443 static struct button_state bstate[MOUSE_MAXBUTTON]; /* button state */
444 static struct button_state *mstate[MOUSE_MAXBUTTON];/* mapped button st.*/
447 /* state machine for 3 button emulation */
450 #define S1 1 /* button 1 delayed down */
451 #define S2 2 /* button 3 delayed down */
452 #define S3 3 /* both buttons down -> button 2 down */
453 #define S4 4 /* button 1 delayed up */
454 #define S5 5 /* button 1 down */
455 #define S6 6 /* button 3 down */
457 #define S8 8 /* button 3 delayed up */
458 #define S9 9 /* button 1 or 3 up after S3 */
566 while ((c = getopt(argc, argv, "3A:C:DE:F:HI:L:PRS:T:VU:a:cdfhi:l:m:p:r:st:w:z:")) != -1)
659 else if (strcmp(optarg, "medium-high") == 0)
661 else if (strcmp(optarg, "medium-low") == 0)
686 rodent.wmode = 1 << (i - 1);
697 * Use button i for negative Z axis movement and
698 * button (i + 1) for positive Z axis movement.
700 if ((i <= 0) || (i > MOUSE_MAXBUTTON - 1)) {
711 if ((i <= 0) || (i > MOUSE_MAXBUTTON - 1)) {
799 rodent.level = -1;
836 if (mstate[j] == &bstate[rodent.zmap[i] - 1])
839 rodent.zmap[i] = 1 << (rodent.zmap[i] - 1);
870 if (rodent.mfd == -1)
875 rodent.mfd = -1;
899 if (rodent.mfd == -1) {
914 if (rodent.mfd != -1)
916 if (rodent.cfd != -1)
918 rodent.mfd = rodent.cfd = -1;
948 rodent.remainx = fdx - *movex;
949 rodent.remainy = fdy - *movey;
957 * most recent non-zero movements and use their average value
981 rodent.remainx = fdx - *movex;
982 rodent.remainy = fdy - *movey;
1003 if ((rodent.cfd = open("/dev/consolectl", O_RDWR, 0)) == -1)
1065 action0.button = action0.obutton;
1071 action.flags, action.button, action.obutton);
1073 action0.obutton = action0.button;
1087 if (read(rodent.mfd, &b, 1) == -1) {
1097 /* Allow middle button drags to scroll up and down */
1098 if (action0.button == MOUSE_BUTTON2DOWN) {
1105 action.flags, action.button, action.obutton);
1108 action.flags, action.button, action.obutton);
1110 /* This isn't a middle button down... move along... */
1113 * We were scrolling, someone let go of button 2.
1124 A(newaction.button & MOUSE_BUTTON1DOWN,
1125 action0.button & MOUSE_BUTTON3DOWN));
1128 newaction.button = MOUSE_BUTTON2DOWN;
1133 newaction.obutton = newaction.button;
1134 newaction.button = action0.button;
1142 A(action0.button & MOUSE_BUTTON1DOWN,
1143 action0.button & MOUSE_BUTTON3DOWN));
1145 action.button, action.obutton);
1147 action0.obutton = action0.button;
1149 flags |= action.obutton ^ action.button;
1155 action2.button, action2.dx, action2.dy, action2.dz);
1159 * If *only* the middle button is pressed AND we are moving
1163 /* Middle button down, waiting for movement threshold */
1167 if (scroll_movement < -rodent.scrollthreshold) {
1175 if (hscroll_movement < -rodent.scrollthreshold) {
1187 if (scroll_movement < -rodent.scrollspeed) {
1189 action2.dz = -1;
1202 if (hscroll_movement < -rodent.scrollspeed) {
1203 action2.dz = -2;
1221 /* X or/and Y movement only - possibly drift */
1263 mouse.u.data.buttons = action2.button;
1279 mouse.u.data.buttons = action2.button;
1296 * button, we need to cook up a corresponding button `up' event
1297 * after sending a button `down' event.
1300 action.obutton = action.button;
1304 action2.button, action2.dx, action2.dy, action2.dz);
1310 mouse.u.data.buttons = action2.button;
1351 "usage: moused [-DRcdfs] [-I file] [-F rate] [-r resolution] [-S baudrate]",
1352 " [-VH [-U threshold]] [-a X[,Y]] [-C threshold] [-m N=M] [-w N]",
1353 " [-z N] [-t <mousetype>] [-l level] [-3 [-E timeout]]",
1354 " [-T distance[,time[,after]]] -p <port>",
1355 " moused [-d] -i <port|if|type|model|all> -p <port>");
1361 * `errnum' is non-zero, append its string form to the message.
1486 rodent.mode.rate = -1;
1528 rodent.mode.protocol = t->val;
1529 rodent.hw.model = t->val2;
1598 ** who don't have the middle button problem, can still specify
1602 ** plus a 4th byte for the middle button. However, the mouse might
1606 ** NOTE: - all commands to (at least the European) MouseMan have to
1608 ** - each command starts with a '*'.
1609 ** - whenever the MouseMan receives a '*', it will switch back
1614 ** - 5 byte packed binary protocol, as with the Mouse Systems
1616 ** - 2 button 3 byte MicroSoft compatible protocol. Selected
1618 ** - 3 button 3+1 byte MicroSoft compatible protocol (default).
1622 ** - 1200 Baud (default). Selected by sequence "*n".
1623 ** - 9600 Baud. Selected by sequence "*q".
1667 * Initialize Hitachi PUMA Plus - Model 1212E to desired settings.
1670 * of the tablet. We only use this tablet for it's 4-button puck
1796 /* MOUSE_MSS_BUTTON?DOWN -> MOUSE_BUTTON?DOWN */
1811 /* MOUSE_INTELLI_BUTTON?DOWN -> MOUSE_BUTTON?DOWN */
1819 /* MOUSE_MSC_BUTTON?UP -> MOUSE_BUTTON?DOWN */
1831 /* MOUSE_PS2_BUTTON?DOWN -> MOUSE_BUTTON?DOWN */
1889 * a) illegal (detected by wrong data-package header)
1890 * b) invalid (0x80 == -128 and that might be wrong for MouseSystems)
1891 * c) bad header-package
1893 * NOTE: b) is a voilation of the MouseSystems-Protocol, since values of
1894 * -128 are allowed, but since they are very seldom we can easily
1895 * use them as package-header with no button pressed.
1922 * Hack for Logitech MouseMan Mouse - Middle button
1926 * middle button status changes.
1929 * and button info. Now post an event message with the old status
1930 * of the left and right buttons and the updated middle button.
1938 * [JCH-96/01/21]
1939 * HACK for ALPS "fourth button". (It's bit 0x10 of the "fourth byte"
1942 * to be extended so that it is identified as Button 4. The lower
1943 * half of the reverse-map may remain unchanged.
1947 * [KY-97/08/03]
1966 * so-called `ten key' mode and 0x30 though 0x3f in the
1968 * button state (including the standard three), we ignore
1971 act->dx = act->dy = act->dz = 0;
1972 act->obutton = act->button;
1974 act->button = (1 << (rBuf - 13))
1975 | (act->obutton & (MOUSE_BUTTON1DOWN | MOUSE_BUTTON3DOWN));
1977 * FIXME: this is a button "down" event. There needs to be
1978 * a corresponding button "up" event... XXX
1995 act->dx = act->dy = 0;
1996 act->dz = (rBuf & 0x08) ? (rBuf & 0x0f) - 16 : (rBuf & 0x0f);
1997 if ((act->dz >= 7) || (act->dz <= -7))
1998 act->dz = 0;
1999 act->obutton = act->button;
2000 act->button = butmapintelli[(rBuf & MOUSE_MSS_BUTTONS) >> 4]
2001 | (act->obutton & (MOUSE_BUTTON1DOWN | MOUSE_BUTTON3DOWN));
2005 act->dx = act->dy = act->dz = 0;
2006 act->obutton = act->button;
2007 act->button = butmapmss2[(rBuf & MOUSE_MSS_BUTTONS) >> 4]
2008 | (act->obutton & (MOUSE_BUTTON1DOWN | MOUSE_BUTTON3DOWN));
2012 act->flags = ((act->dx || act->dy || act->dz) ? MOUSE_POSCHANGED : 0)
2013 | (act->obutton ^ act->button);
2015 return (act->flags);
2033 act->dz = 0;
2034 act->obutton = act->button;
2040 act->button = act->obutton & MOUSE_BUTTON4DOWN;
2042 act->button |= ((pBuf[0] & MOUSE_MSS_BUTTONS) == MOUSE_MSS_BUTTONS)
2046 act->button |= (act->obutton & MOUSE_BUTTON2DOWN)
2049 /* Send X10 btn events to remote client (ensure -128-+127 range) */
2060 act->dx = (signed char)(((pBuf[0] & 0x03) << 6) | (pBuf[1] & 0x3F));
2061 act->dy = (signed char)(((pBuf[0] & 0x0C) << 4) | (pBuf[2] & 0x3F));
2068 act->button = (act->obutton & (MOUSE_BUTTON2DOWN | MOUSE_BUTTON4DOWN))
2070 act->dx = (signed char)(((pBuf[0] & 0x03) << 6) | (pBuf[1] & 0x3F));
2071 act->dy = (signed char)(((pBuf[0] & 0x0C) << 4) | (pBuf[2] & 0x3F));
2078 act->button = butmapmsc[(~pBuf[0]) & MOUSE_MSC_BUTTONS];
2079 act->dx = (signed char)(pBuf[1]) + (signed char)(pBuf[3]);
2080 act->dy = - ((signed char)(pBuf[2]) + (signed char)(pBuf[4]));
2085 act->dz = -1;
2087 act->dz = 1;
2089 act->button = MOUSE_BUTTON1DOWN;
2091 act->button = 0;
2095 act->button = butmaphit[pBuf[0] & 0x07];
2096 act->dx = (pBuf[0] & MOUSE_MM_XPOSITIVE) ? pBuf[1] : - pBuf[1];
2097 act->dy = (pBuf[0] & MOUSE_MM_YPOSITIVE) ? - pBuf[2] : pBuf[2];
2102 act->button = butmapmsc[pBuf[0] & MOUSE_MSC_BUTTONS];
2103 act->dx = (pBuf[0] & MOUSE_MM_XPOSITIVE) ? pBuf[1] : - pBuf[1];
2104 act->dy = (pBuf[0] & MOUSE_MM_YPOSITIVE) ? - pBuf[2] : pBuf[2];
2108 act->button = butmapversa[(pBuf[0] & MOUSE_VERSA_BUTTONS) >> 3];
2109 act->button |= (pBuf[0] & MOUSE_VERSA_TAP) ? MOUSE_BUTTON4DOWN : 0;
2110 act->dx = act->dy = 0;
2117 x -= 0x1000;
2120 y -= 0x1000;
2122 act->dx = prev_x - x;
2123 act->dy = prev_y - y;
2132 act->button = butmapps2[pBuf[0] & MOUSE_PS2_BUTTONS];
2133 act->dx = (pBuf[0] & MOUSE_PS2_XNEG) ? pBuf[1] - 256 : pBuf[1];
2134 act->dy = (pBuf[0] & MOUSE_PS2_YNEG) ? -(pBuf[2] - 256) : -pBuf[2];
2139 * requets the level 2 at which wheel movement and additional button
2140 * actions are encoded in model-dependent formats. At the level 0
2141 * the following code is no-op because the psm driver says the model
2146 /* wheel and additional button data is in the fourth byte */
2147 act->dz = (pBuf[3] & MOUSE_EXPLORER_ZNEG)
2148 ? (pBuf[3] & 0x0f) - 16 : (pBuf[3] & 0x0f);
2149 act->button |= (pBuf[3] & MOUSE_EXPLORER_BUTTON4DOWN)
2151 act->button |= (pBuf[3] & MOUSE_EXPLORER_BUTTON5DOWN)
2157 act->dz = (signed char)pBuf[3];
2158 if ((act->dz >= 7) || (act->dz <= -7))
2159 act->dz = 0;
2161 act->button |= (pBuf[0] & MOUSE_PS2INTELLI_BUTTON4DOWN)
2163 act->button |= (pBuf[0] & MOUSE_PS2INTELLI_BUTTON5DOWN)
2168 && (abs(act->dx) > 191)
2170 /* the extended data packet encodes button and wheel events */
2174 act->dx = act->dy = 0;
2176 /* horizontal roller count - ignore it XXX*/
2179 act->dz = (pBuf[2] & MOUSE_PS2PLUS_ZNEG)
2180 ? (pBuf[2] & 0x0f) - 16 : (pBuf[2] & 0x0f);
2182 act->button |= (pBuf[2] & MOUSE_PS2PLUS_BUTTON4DOWN)
2184 act->button |= (pBuf[2] & MOUSE_PS2PLUS_BUTTON5DOWN)
2193 act->dx = act->dy = 0;
2196 act->dz = (pBuf[2] & MOUSE_SPOINT_WNEG) ? -2 : 2;
2199 act->dz = (pBuf[2] & MOUSE_SPOINT_ZNEG) ? -1 : 1;
2202 act->dz = (pBuf[2] & MOUSE_SPOINT_ZNEG)
2203 ? ((pBuf[2] >> 4) & 0x0f) - 16
2206 act->dw = (pBuf[2] & MOUSE_SPOINT_WNEG)
2207 ? (pBuf[2] & 0x0f) - 16 : (pBuf[2] & 0x0f);
2211 /* device type packet - shouldn't happen */
2214 act->dx = act->dy = 0;
2215 act->button = act->obutton;
2222 /* preserve button states */
2223 act->button |= act->obutton & MOUSE_EXTBUTTONS;
2228 act->button |= ((pBuf[0] & MOUSE_PS2_TAP)) ? 0 : MOUSE_BUTTON4DOWN;
2232 act->button |= (pBuf[3] & MOUSE_PS2_BUTTON3DOWN)
2234 act->button |= (pBuf[3] & MOUSE_PS2_BUTTON1DOWN)
2236 act->dz = (pBuf[3] & MOUSE_PS2_XNEG) ? pBuf[4] - 256 : pBuf[4];
2239 /* the fourth button state in the first byte */
2240 act->button |= (pBuf[0] & MOUSE_PS2_TAP) ? MOUSE_BUTTON4DOWN : 0;
2243 act->button = butmapversaps2[pBuf[0] & MOUSE_PS2VERSA_BUTTONS];
2244 act->button |=
2246 act->dx = act->dy = 0;
2253 x -= 0x1000;
2256 y -= 0x1000;
2258 act->dx = prev_x - x;
2259 act->dy = prev_y - y;
2267 act->dx = (pBuf[1] & 0x80) ? pBuf[1] - 256 : pBuf[1];
2268 act->dy = (pBuf[2] & 0x80) ? -(pBuf[2] - 256) : -pBuf[2];
2271 act->dz = 1;
2274 act->dz = -1;
2277 act->dz = 2;
2280 act->dz = -2;
2285 if ((act->dx < 16 - 256) && (act->dy > 256 - 16)) {
2286 act->dx = act->dy = 0;
2288 act->button |= MOUSE_BUTTON4DOWN;
2289 act->dz = (pBuf[2] & MOUSE_4DPLUS_ZNEG)
2290 ? ((pBuf[2] & 0x07) - 8) : (pBuf[2] & 0x07);
2292 /* preserve previous button states */
2293 act->button |= act->obutton & MOUSE_EXTBUTTONS;
2303 act->button = butmapmsc[(~pBuf[0]) & MOUSE_SYS_STDBUTTONS];
2304 act->dx = (signed char)(pBuf[1]) + (signed char)(pBuf[3]);
2305 act->dy = - ((signed char)(pBuf[2]) + (signed char)(pBuf[4]));
2307 act->dz = ((signed char)(pBuf[5] << 1) + (signed char)(pBuf[6] << 1)) >> 1;
2308 act->button |= ((~pBuf[7] & MOUSE_SYS_EXTBUTTONS) << 3);
2321 act->flags = ((act->dx || act->dy || act->dz) ? MOUSE_POSCHANGED : 0)
2322 | (act->obutton ^ act->button);
2324 return (act->flags);
2333 a2->dx = a1->dx;
2334 a2->dy = a1->dy;
2335 a2->dz = a1->dz;
2336 a2->obutton = a2->button;
2337 a2->button = a1->button;
2338 a2->flags = a1->flags;
2343 debug("state:%d, trans:%d -> state:%d",
2347 * Avoid re-ordering button and movement events. While a button
2350 * occur, then complete the deferred button events immediately.
2352 if ((a2->dx != 0 || a2->dy != 0) &&
2360 a2->dx = a2->dy = 0;
2368 a2->button &=
2370 a2->button &= states[mouse_button_state].mask;
2371 a2->button |= states[mouse_button_state].buttons;
2372 flags = a2->flags & MOUSE_POSCHANGED;
2373 flags |= a2->obutton ^ a2->button;
2375 a2->flags = flags & MOUSE_BUTTON2DOWN;
2378 a2->flags = flags;
2383 /* phisical to logical button mapping */
2432 p2l[pbutton - 1] = 1 << (lbutton - 1);
2433 mstate[lbutton - 1] = &bstate[pbutton - 1];
2446 pbuttons = act1->button;
2449 act2->obutton = act2->button;
2452 act1->dz = act1->dy;
2453 act1->dx = 0;
2454 act1->dy = 0;
2456 act2->dx = act1->dx;
2457 act2->dy = act1->dy;
2458 act2->dz = act1->dz;
2464 if (act1->dz != 0) {
2465 act2->dx = act1->dz;
2466 act2->dz = 0;
2470 if (act1->dz != 0) {
2471 act2->dy = act1->dz;
2472 act2->dz = 0;
2478 if ((act1->dz < -1) && rodent.zmap[2]) {
2481 } else if (act1->dz < 0) {
2484 } else if ((act1->dz > 1) && rodent.zmap[3]) {
2487 } else if (act1->dz > 0) {
2491 act2->dz = 0;
2499 act2->button = lbuttons;
2501 act2->flags = ((act2->dx || act2->dy || act2->dz) ? MOUSE_POSCHANGED : 0)
2502 | (act2->obutton ^ act2->button);
2512 int button;
2516 mask = act->flags & MOUSE_BUTTONS;
2531 /* 3 button emulation timeout */
2536 button = MOUSE_BUTTON1DOWN;
2539 if (act->button & button) {
2540 /* the button is down */
2550 /* the button is up */
2554 if (act->button & button) {
2555 /* the button has been down */
2559 act->flags |= button;
2560 debug("button %d timeout", i + 1);
2563 /* the button has been up */
2566 button <<= 1;
2591 int button;
2595 mask = act->flags & MOUSE_BUTTONS;
2599 button = MOUSE_BUTTON1DOWN;
2602 debug("mstate[%d]->count:%d", i, mstate[i]->count);
2603 if (act->button & button) {
2604 /* the button is down */
2605 mouse.u.event.value = mstate[i]->count;
2607 /* the button is up */
2611 mouse.u.event.id = button;
2615 debug("button %d count %d", i + 1, mouse.u.event.value);
2617 button <<= 1;
2623 /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/posix_tty.c,v 3.4 1995/01/28 17:05:03 dawes Exp $ */
2736 * It's a simplistic implementation, but it works :-)
2898 begin = -1;
2905 debug("begin-id %02x", c);
2906 begin = i - 1;
2934 i -= begin;
2938 debug("len:%d, '%-*.*s'", i, i, i, buf);
2940 if (buf[i - 1] == c)
2962 id->revision = 0;
2963 id->eisaid = NULL;
2964 id->serial = NULL;
2965 id->class = NULL;
2966 id->compat = NULL;
2967 id->description = NULL;
2968 id->neisaid = 0;
2969 id->nserial = 0;
2970 id->nclass = 0;
2971 id->ncompat = 0;
2972 id->ndescription = 0;
2975 /* non-PnP mice */
2980 id->eisaid = "PNP0F01";
2983 id->eisaid = "PNP0F04";
2986 id->neisaid = strlen(id->eisaid);
2987 id->class = "MOUSE";
2988 id->nclass = strlen(id->class);
2989 debug("non-PnP mouse '%c'", buf[0]);
2994 offset = 0x28 - buf[0];
2997 for (i = 0; i < len - 3; ++i) {
3001 sum += buf[len - 1];
3007 buf[1] -= offset;
3008 buf[2] -= offset;
3009 id->revision = ((buf[1] & 0x3f) << 6) | (buf[2] & 0x3f);
3010 debug("PnP rev %d.%02d", id->revision / 100, id->revision % 100);
3013 id->eisaid = &buf[3];
3014 id->neisaid = 7;
3025 i -= 3;
3026 if (i - j == 8) {
3027 id->serial = &buf[j];
3028 id->nserial = 8;
3038 i -= 3;
3040 id->class = &buf[j];
3041 id->nclass = i - j;
3057 i -= 3;
3059 id->compat = &buf[j];
3060 id->ncompat = i - j;
3070 i -= 3;
3072 id->description = &buf[j];
3073 id->ndescription = i - j;
3078 if ((id->nserial > 0) || (id->nclass > 0)
3079 || (id->ncompat > 0) || (id->ndescription > 0)) {
3082 if (strncmp(s, &buf[len - 3], 2) != 0) {
3103 if (id->nclass > 0)
3104 if (strncmp(id->class, "MOUSE", id->nclass) != 0 &&
3105 strncmp(id->class, "TABLET", id->nclass) != 0)
3109 if (id->neisaid > 0) {
3110 t = gettoken(pnpprod, id->eisaid, id->neisaid);
3111 if (t->val != MOUSE_PROTO_UNKNOWN)
3119 if (id->ncompat <= 0)
3121 for (i = 0; i < id->ncompat; ++i) {
3122 for (j = i; id->compat[i] != ','; ++i)
3123 if (i >= id->ncompat)
3126 t = gettoken(pnpprod, id->compat + j, i - j);
3127 if (t->val != MOUSE_PROTO_UNKNOWN)
3166 The tablet responds to the COM PnP protocol 1.0 with EISA-ID KYE0005,
3167 and to pre-pnp probes (RTS toggle) with 'T' (tablet ?)
3171 the proximity, tip and button info:
3173 (byte0 & 0x2) true = button pressed
3193 static int buflen = 0, b_prev = 0 , x_prev = -1, y_prev = -1;
3213 x = buf[1]+128*(buf[2] - 7);
3215 y = 28*128 - (buf[3] + 128* (buf[4] - 7));
3221 act->flags = 0;
3222 act->obutton = act->button;
3223 act->dx = act->dy = act->dz = 0;
3228 act->flags |= MOUSE_POSCHANGED; /* force update */
3233 act->dx = x - x_prev;
3234 act->dy = y - y_prev;
3235 if (act->dx || act->dy)
3236 act->flags |= MOUSE_POSCHANGED;
3239 if (b_prev != 0 && b_prev != buf[0]) { /* possibly record button change */
3240 act->button = 0;
3242 act->button |= MOUSE_BUTTON1DOWN;
3243 if (buf[0] & 0x02) /* button pressed */
3244 act->button |= MOUSE_BUTTON2DOWN;
3245 act->flags |= MOUSE_BUTTONSCHANGED;
3248 return (act->flags);
3255 static int buflen = 0, b_prev = 0 , x_prev = -1, y_prev = -1;
3281 y = 4768 - ((buf[4] & ~GTCO_START) << 6 | (buf[3] & ~GTCO_START));
3286 act->flags = 0;
3287 act->obutton = act->button;
3288 act->dx = act->dy = act->dz = 0;
3293 act->flags |= MOUSE_POSCHANGED; /* force update */
3299 act->dx = x - x_prev;
3300 act->dy = y - y_prev;
3301 if (act->dx || act->dy)
3302 act->flags |= MOUSE_POSCHANGED;
3306 /* possibly record button change */
3308 act->button = 0;
3311 act->button |= MOUSE_BUTTON1DOWN;
3315 act->button |= MOUSE_BUTTON2DOWN;
3319 act->button |= MOUSE_BUTTON3DOWN;
3323 act->button |= MOUSE_BUTTON4DOWN;
3325 act->flags |= MOUSE_BUTTONSCHANGED;
3328 return (act->flags);
3348 #define SUN_LEN(unp) (((char *)(unp)->sun_path - (char *)(unp)) + \
3349 strlen((unp)->path))
3387 rodent.mremcfd = -1;