Sensitivity for touch screens

8 views
Skip to first unread message

Eric Sokolowsky

unread,
Sep 10, 2025, 10:11:14 AMSep 10
to fltkg...@googlegroups.com
I'm writing an application with FLTK 1.4.4 that is primarily intended to be run on a touch screen. I have a group derived from Fl_Scroll that has scrolling enabled (through using a custom handler that detects FL_ENTER and FL_DRAG events), but I also want to enable selecting individual items within that group. I don't use scroll bars on this widget, since it's a touch screen the user just drags the contents and the scroll happens. This is all working. However, the scrolling is enabled if even a slight displacement occurs, resulting in a FL_DRAG event, so I don't see FL_RELEASE events. Since touch screens are very sensitive it's very difficult to push only without any hint of dragging. I only want to select an object when I receive an FL_RELEASE because I don't want to pick anything if the user is scrolling (this would cause too much unintended picking).

So my question is this: is there a way to control the sensitivity of an Fl_Scroll so that dragging only occurs if a drag exceeds a certain threshold? I think I could figure out how to derive a class from Fl_Scroll to do this, but this might be a generally-helpful feature to add to make FLTK more touch-screen friendly.

Eric
Reply all
Reply to author
Forward
0 new messages