Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!sri-spam!ames!ucbcad!ucbvax!GREMLIN.NRTC.NORTHROP.COM!jromine From: jromine@GREMLIN.NRTC.NORTHROP.COM (John Romine) Newsgroups: comp.windows.x Subject: Re: Flaky cursor on color Sun Message-ID: <22539.549222138@gremlin.nrtc.northrop.com> Date: Thu, 28-May-87 17:18:06 EDT Article-I.D.: gremlin.22539.549222138 Posted: Thu May 28 17:18:06 1987 Date-Received: Sat, 30-May-87 09:11:31 EDT References: <1610@kontron.UUCP> Sender: daemon@ucbvax.BERKELEY.EDU Distribution: world Organization: The ARPA Internet Lines: 93 on a Sun 3/260 color system... whenever the mouse cursor gets very near the left edge of the screen, I get "mouse droppings" (leftover images of the cursor) along the this edge. Yes, I had this problem too (on 3/280 and 3/160 color systems). The problem is when the mouse is accelerated, it can end up at an invalid location. Below is a context diff of the fix I installed. Note, this doesn't totally cure the problem, it just stops it from happening most of the time. Also, you will probably want to slow down the mouse acceleration using "xset m"; doing that also causes the problem to occur less often. John Romine Northrop Research and Technology Center jromine@gremlin.nrtc.northrop.com 213/544-5219 *** /tmp/,RCSt1a04028 Thu May 28 10:26:21 1987 --- events.c Fri Apr 17 17:53:48 1987 *************** *** 74,81 **** extern int vsdev; extern DEVICE *CurrentDevice; ! int sunthreshold = 0; ! int sunaccel = 0; #ifdef RAW_KBD extern unsigned state_mask; --- 74,81 ---- extern int vsdev; extern DEVICE *CurrentDevice; ! int sunthreshold = 1; /* was 0 /JLR */ ! int sunaccel = 1; /* was 0 /JLR */ #ifdef RAW_KBD extern unsigned state_mask; *************** *** 326,340 **** int dy = Xevent.vse_y - CurrentDevice->mouse->y; if (sunthreshold <= (dx > 0 ? dx : -dx) + (dy > 0 ? dy : -dy)) { ! Xevent.vse_x = CurrentDevice->mouse->x + dx * sunaccel; ! Xevent.vse_y = CurrentDevice->mouse->y + dy * sunaccel; ! } ! } - SetCursorPosition((vsCursor *) &Xevent); /* XXX - tacky */ } ! Xevent.vse_key; if (Xevent.vse_type == VSE_MMOTION) { register vsBox *b = CurrentDevice->mbox; --- 326,360 ---- int dy = Xevent.vse_y - CurrentDevice->mouse->y; if (sunthreshold <= (dx > 0 ? dx : -dx) + (dy > 0 ? dy : -dy)) { ! register short new_x, new_y; /* 09Apr87/JLR */ ! ! new_x = CurrentDevice->mouse->x + dx * sunaccel; ! new_y = CurrentDevice->mouse->y + dy * sunaccel; ! ! /* keep cursor on screen - 09Apr98/JLR */ ! /* this should check against cursor->... see cursor.c */ ! if (new_x >= CurrentDevice->width) /* cursor->xmax */ ! Xevent.vse_x = CurrentDevice->width - 1; ! else if (new_x < 0) /* cursor->xmin */ ! Xevent.vse_x = 0; ! else ! Xevent.vse_x = (unsigned short) new_x; ! ! if (new_y >= CurrentDevice->height) /* cursor->ymax */ ! Xevent.vse_y = CurrentDevice->height - 1; ! else if (new_y < 0) /* cursor->ymin */ ! Xevent.vse_y = 0; ! else ! Xevent.vse_y = (unsigned short) new_y; ! } ! #ifdef notdef ! fprintf (stderr, "\nMOTION: %d, %d\n", Xevent.vse_x, Xevent.vse_y); ! #endif notdef ! SetCursorPosition((vsCursor *) &Xevent);/* XXX - tacky */ } } ! Xevent.vse_key; /* EH? */ if (Xevent.vse_type == VSE_MMOTION) { register vsBox *b = CurrentDevice->mbox;