diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2005-10-12 20:47:21 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2005-10-12 20:47:21 +0000 |
| commit | 405b80784abdb70a9aa5a09abb9e060c60153187 (patch) | |
| tree | 32bcad5f8f228d2e8b6c9af6d00be28b77f0a461 /src/Fl_Value_Input.cxx | |
| parent | a59330c2c4f51e7be6ef3281d13a1b32d202cf8d (diff) | |
Fl_Value_Input now uses the screen-absolute position instead of
the window-relative position when dragging the value; this avoids
some jumping conditions (STR #1037)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4591 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Value_Input.cxx')
| -rw-r--r-- | src/Fl_Value_Input.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Fl_Value_Input.cxx b/src/Fl_Value_Input.cxx index 9daa95da7..d3f5c6e61 100644 --- a/src/Fl_Value_Input.cxx +++ b/src/Fl_Value_Input.cxx @@ -71,7 +71,7 @@ void Fl_Value_Input::value_damage() { int Fl_Value_Input::handle(int event) { double v; int delta; - int mx = Fl::event_x(); + int mx = Fl::event_x_root(); static int ix, drag; input.when(when()); switch (event) { @@ -83,7 +83,7 @@ int Fl_Value_Input::handle(int event) { return 1; case FL_DRAG: if (!step()) goto DEFAULT; - delta = Fl::event_x()-ix; + delta = mx-ix; if (delta > 5) delta -= 5; else if (delta < -5) delta += 5; else delta = 0; |
