right use of tk_scaling in sticky click + move

This commit is contained in:
stefan schippers 2025-09-10 13:49:27 +02:00
parent c301a5ed67
commit 37d41151bc
1 changed files with 1 additions and 1 deletions

View File

@ -2438,7 +2438,7 @@ static void handle_motion_notify(int event, KeySym key, int state, int rstate, i
!(state & ShiftMask) && !(xctx->ui_state & (PLACE_SYMBOL | PLACE_TEXT)))
{
/* make motion a bit sticky. require 10 pixels (screen units, not xschem units) */
if(abs(mx - xctx->mx_save) * tk_scaling > 10 || abs(my - xctx->my_save) * tk_scaling > 10) {
if(abs(mx - xctx->mx_save) > tk_scaling * 10 || abs(my - xctx->my_save) > tk_scaling * 10) {
xctx->mouse_moved = 1;
if(!xctx->drag_elements) {
int stretch = (state & ControlMask) ? !enable_stretch : enable_stretch;