FLTK logo

STR #2821

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  |  Screenshots  ]
 

Return to Bugs & Features | Roadmap 1.3 | Post Text | Post File | SVN ⇄ GIT | Prev | Next ]

STR #2821

Application:FLTK Library
Status:5 - New
Priority:1 - Request for Enhancement, e.g. asking for a feature
Scope:3 - Applies to all machines and operating systems
Subsystem:OS support
Summary:MouseWheel acceleration patch
Version:1.3-feature
Created By:mingodad
Assigned To:Unassigned
Fix Version:Unassigned
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:

Post File ]
Name/Time/Date Filename/Size  
 
#1 mingodad
12:20 Apr 10, 2012
mousewheel-acceleration.patch
3k
 
 
#2 AlbrechtS
14:46 Apr 10, 2012
mousewheel-acceleration_2.patch
3k
 
     

Trouble Report Comments:

Post Text ]
Name/Time/Date Text  
 
#1 mingodad
12:20 Apr 10, 2012
Here I'm attaching a patch to FLTK 1.3 that adds mouse wheel acceleration.  
 
#2 mingodad
12:24 Apr 10, 2012
The functions getMilliCount() and getMilliSpan() came from http://www.firstobject.com/getmillicount-milliseconds-portable-c++.htm , this was tested on win32 mingw.  
 
#3 AlbrechtS
14:46 Apr 10, 2012
Thanks for the patch, but ...

to mousewheel-acceleration.patch (technical aspects):

(1) This patch was "malformed" in several places (error message from patch), so I had to hand-edit the patch to apply it! How did you produce/upload this patch file?

(2) Indentation and coding standard is not what FLTK's CMP says. I fixed indentation, code formatting, etc. ...

Results: see attached improved file mousewheel-acceleration_2.patch.

Further comments:

(3) I didn't test anything (yet), except that it can be compiled on Windows and Linux.

(4) I don't know if this is something we want to have w/o an option to switch it on and off, or have some fine tuning, but it looks as if it could be useful. I found an article [1] with a video [2] (see link in the article) that explains how "mouse wheel acceleration" should work (although I can translate the words, I couldn't really imagine how it would work. The video shows it - somehow).

(5) I still don't like the method names in the Fl class, they should probably be renamed to something more FLTK-alike, but that's a secondary issue. The functions would also need doxygen comments.

Comments, suggestions, anybody?

----------------------------------------------------
[1] http://ubuntuforums.org/showthread.php?t=1566441
[2] http://www.youtube.com/watch?v=qZHjPZi2sI0
 
 
#4 AlbrechtS
14:57 Apr 10, 2012
Okay, I can confirm that it works on Windows and Linux as expected. Test case:

run "test/editor src/Fl.cxx"

then use the mouse wheel to scroll through the file.

With the patch applied, I can scroll through the entire file with about 15 quick mouse wheel moves, w/o the patch this would only be about a quarter of the file or less. I can still scroll finer with slow mouse wheel moves.

Maybe someone with Mac experience can comment on this?
 
 
#5 greg.ercolano
17:50 Apr 10, 2012
I don't know much about this subject, but..

Regarding the Mac, I believe mouse scroll acceleration is an option already managed by the OS (eg. System Prefs -> Mouse -> Scroll Speed), which is probably as it should be. (ie. globally controlled for all apps)

So perhaps the patch should be disabled on OSX, or any other OS where  acceleration is managed by the OS.
 
 
#6 matt
09:01 Feb 09, 2019
Greg is correct. That's exactly what MacOS does. It would surely still be nice to have that for the other platforms. There are the user- and global FLTK preferences that could be used to disable this.  
     

Return to Bugs & Features | Post Text | Post File ]

 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.