Commit aa5a3fc0 authored by Jeffrey Lee's avatar Jeffrey Lee

Improve scrollwheel handling

Detail:
  build/c/usbmouse - Scrollwheel code now only sends scroll requests in a given direction if the window has an appropriate scroll bar.
  build/Version - Incremented USBDriver version number
Admin:
  Tested in OMAP3 ROM
  Fixes issue reported on forums where it was possible to scroll filer windows horizontally if you used a mouse with a 'w' axis


Version 0.64. Tagged as 'NetBSD-0_64'
parent d3628750
/* (0.63)
/* (0.64)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 0.63
#define Module_MajorVersion_CMHG 0.64
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 04 Dec 2011
#define Module_Date_CMHG 10 Dec 2011
#define Module_MajorVersion "0.63"
#define Module_Version 63
#define Module_MajorVersion "0.64"
#define Module_Version 64
#define Module_MinorVersion ""
#define Module_Date "04 Dec 2011"
#define Module_Date "10 Dec 2011"
#define Module_ApplicationDate "04-Dec-11"
#define Module_ApplicationDate "10-Dec-11"
#define Module_ComponentName "NetBSD"
#define Module_ComponentPath "mixed/RiscOS/Sources/HWSupport/USB/NetBSD"
#define Module_FullVersion "0.63"
#define Module_HelpVersion "0.63 (04 Dec 2011)"
#define Module_LibraryVersionInfo "0:63"
#define Module_FullVersion "0.64"
#define Module_HelpVersion "0.64 (10 Dec 2011)"
#define Module_LibraryVersionInfo "0:64"
......@@ -8,5 +8,5 @@
#define EHCIDriverModule_Module_Date_CMHG 04 Dec 2011
#define EHCIDriverModule_MajorVersion_CMHG 0.20
#define USBDriverModule_Module_Date_CMHG 22 Aug 2011
#define USBDriverModule_MajorVersion_CMHG 0.54
#define USBDriverModule_Module_Date_CMHG 10 Dec 2011
#define USBDriverModule_MajorVersion_CMHG 0.55
......@@ -636,7 +636,7 @@ int pointerv (_kernel_swi_regs* r, void* pw)
static _kernel_oserror *zscroll_handler(_kernel_swi_regs *r, void *pw, void *h)
{
int b[64];
int b[10];
(void) r;
(void) pw;
......@@ -644,11 +644,28 @@ static _kernel_oserror *zscroll_handler(_kernel_swi_regs *r, void *pw, void *h)
_swix (Wimp_GetPointerInfo, _IN(1), b);
b[0] = b[3];
if((relz || relw) && !_swix (Wimp_GetWindowState, _IN(1), b)) // valid window handle
if((relz || relw) && (b[0] != -1) && !_swix (Wimp_GetWindowState, _IN(1), b)) // valid window handle
{
/* does it do scroll requests? */
if (b[8] & ((1<<8)|(1<<9)))
{
/* Only scroll if scrollbars are present */
if(b[8] & (1<<31))
{
/* New format window flags word */
if(!(b[8] & (1<<28)))
relz = 0;
if(!(b[8] & (1<<30)))
relw = 0;
}
else
{
/* Old format window flags word */
if(!(b[8] & (1<<2)))
relz = 0;
if(!(b[8] & (1<<3)))
relw = 0;
}
relz*=5; // a bit more movement...
relw*=5;
while(relz || relw)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment