nanogui: delayed mouse movements


Previous by date: 29 Feb 2000 23:22:51 -0000 Re: gtk för MicroWindows ?, "Alex Peuchert"
Next by date: 29 Feb 2000 23:22:51 -0000 Re: [linuxce-devel] Browser..., Darran D. Rimron
Previous in thread:
Next in thread: 29 Feb 2000 23:22:51 -0000 Re: delayed mouse movements, Greg Haerr

Subject: delayed mouse movements
From: George Harvey ####@####.####
Date: 29 Feb 2000 23:22:51 -0000
Message-Id: <yam8094.2595.144334792@smtp.dial.pipex.com>

Hi,

I am experimenting with a port of Microwindows to an old Isicad Prisma
workstation (running uClinux). I am writing my own display driver but
using the standard serial mouse driver. While running some of the demo
programs I noticed a curious time lag effect with mouse movement, after
a large move the cursor did not seem to keep up but the next time the
mouse was moved, the cursor would leap forward and then continue.

From an examination of the code, I think that the problem lies with
the buffering of mouse movements in drivers/mou_ser.c. When the mouse
is read by GdReadMouse() it can leave data in the buffer which will
not be processed until the next time the mouse is physically moved.
I have made the following change to nanox/srvevent.c and mwin/winevent.c
which causes all buffered data to be processed whenever a mouse event
occurs. This appears to fix the problem (I suspect that the only reason
I saw it in the first place is that the Prisma is very slow at displaying
bitmaps so mouse movements could get ahead of the cursor display updates).

George Harvey
####@####.####


*** srvevent.orig.cTue Feb 29 22:14:57 2000
--- srvevent.cTue Feb 29 22:16:10 2000
***************
*** 100,114 ****
     intmousestatus;/* latest mouse status */
  
     /* Read the latest mouse status: */
!    mousestatus = GdReadMouse(&rootx, &rooty, &newbuttons);
     if(mousestatus < 0) {
        GsError(GR_ERROR_MOUSE_ERROR, 0);
        return FALSE;
-    } else if(mousestatus) {/* Deliver events as appropriate: */
-       GsHandleMouseStatus(rootx, rooty, newbuttons);
-       return TRUE;
     }
!    return FALSE;
  }
  
  /*
--- 100,113 ----
     intmousestatus;/* latest mouse status */
  
     /* Read the latest mouse status: */
!    while ((mousestatus = GdReadMouse(&rootx, &rooty, &newbuttons)) > 0) {
!       GsHandleMouseStatus(rootx, rooty, newbuttons);
!    }
     if(mousestatus < 0) {
        GsError(GR_ERROR_MOUSE_ERROR, 0);
        return FALSE;
     }
!    return TRUE;
  }
  
  /*



Previous by date: 29 Feb 2000 23:22:51 -0000 Re: gtk för MicroWindows ?, "Alex Peuchert"
Next by date: 29 Feb 2000 23:22:51 -0000 Re: [linuxce-devel] Browser..., Darran D. Rimron
Previous in thread:
Next in thread: 29 Feb 2000 23:22:51 -0000 Re: delayed mouse movements, Greg Haerr


Powered by ezmlm-browse 0.20.