move threshold for drags goes back to pair<int,int>

And for now, there's only a single implementation, though other types of
drags could implement it if needed. There really seems to be no need.

Note that the x-axis threshold is 3x in the case of a copy-drag.
This commit is contained in:
Paul Davis 2025-08-19 11:29:13 -06:00
parent f34e314d93
commit 1efd0c06bd
2 changed files with 14 additions and 30 deletions

View file

@ -309,6 +309,16 @@ Drag::~Drag ()
DEBUG_TRACE (DEBUG::Drags, "drag destroyed\n");
}
Drag::MoveThreshold
Drag::move_threshold () const
{
int basic_pixels = 4;
int x = _copy ? basic_pixels * 3 : basic_pixels;
int y = basic_pixels;
return std::make_pair (x, y);
}
void
Drag::set_time_domain (Temporal::TimeDomain td)
{
@ -504,7 +514,7 @@ Drag::motion_handler (GdkEvent* event, bool from_autoscroll)
return false;
}
pair<timecnt_t, int> const threshold = move_threshold ();
MoveThreshold const threshold = move_threshold ();
bool const old_move_threshold_passed = _move_threshold_passed;