Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 86994 Details for
Bug 194143
WM_MOUSEWHEEL can send fractional deltas
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proof of concept patch for free-spin logitech mousewheels
Scrollable.java.patch (text/plain), 2.03 KB, created by
Francois
on 2008-01-15 18:41:30 EST
(
hide
)
Description:
Proof of concept patch for free-spin logitech mousewheels
Filename:
MIME Type:
Creator:
Francois
Created:
2008-01-15 18:41:30 EST
Size:
2.03 KB
patch
obsolete
>Index: Eclipse SWT/win32/org/eclipse/swt/widgets/Scrollable.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scrollable.java,v >retrieving revision 1.38 >diff -u -r1.38 Scrollable.java >--- Eclipse SWT/win32/org/eclipse/swt/widgets/Scrollable.java 31 May 2007 22:04:16 -0000 1.38 >+++ Eclipse SWT/win32/org/eclipse/swt/widgets/Scrollable.java 15 Jan 2008 22:37:19 -0000 >@@ -259,6 +259,8 @@ > return result; > } > >+int count = -1; >+ > LRESULT WM_MOUSEWHEEL (int wParam, int lParam) { > LRESULT result = super.WM_MOUSEWHEEL (wParam, lParam); > if (result != null) return result; >@@ -281,15 +283,18 @@ > count = Math.abs (delta / OS.WHEEL_DELTA); > } else { > code = delta < 0 ? OS.SB_LINEDOWN : OS.SB_LINEUP; >- delta = Math.abs (delta); >- if (delta < OS.WHEEL_DELTA) return result; >+ delta = delta < 0 ? -9*delta/4 : delta; > if (msg == OS.WM_VSCROLL) { >- count = value [0] * delta / OS.WHEEL_DELTA; >+ this.count = value [0] * delta; >+ OS.SendMessage (handle, msg, code, 0); >+ this.count = -1; >+ return LRESULT.ZERO; > } else { >+ if (delta < OS.WHEEL_DELTA) return result; > count = delta / OS.WHEEL_DELTA; > } > } >- for (int i=0; i<count; i++) { >+ for (int i=0; i<count; i++) { > OS.SendMessage (handle, msg, code, 0); > } > return LRESULT.ZERO; >@@ -381,11 +386,11 @@ > info.nPos = info.nMax; > break; > case OS.SB_LINEDOWN: >- info.nPos += bar.getIncrement (); >+ info.nPos += (count>0 ? bar.getIncrement ()*count/OS.WHEEL_DELTA : bar.getIncrement ()); > break; > case OS.SB_LINEUP: > int increment = bar.getIncrement (); >- info.nPos = Math.max (info.nMin, info.nPos - increment); >+ info.nPos = Math.max (info.nMin, info.nPos - (count>0 ? increment*count/OS.WHEEL_DELTA : increment)); > break; > case OS.SB_PAGEDOWN: > info.nPos += bar.getPageIncrement ();
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 194143
:
72296
| 86994