ui-contract: a foreign drag moving to another row restarts the rest wait

The wait timed whether any row was under the pointer, so half a delay on one tab and half on the next selected the
second.
This commit is contained in:
bflatastic
2026-11-22 08:18:35 +07:00
parent 04570159a7
commit 4f74e5639c
@@ -240,6 +240,10 @@ impl<C: Collection> ItemsHooks<'_, '_, C> {
.map(|(_, row)| row)
.filter(|row| before.pointer != pos || before.row == Some(*row));
*cx.core.memory.shown::<DragRest>(slot) = DragRest { pointer: pos, row: target };
// Another row restarts the wait.
if target != before.row {
crate::contract::overlay::dwell(&ctx, &mut *cx.core.memory, id, "drag rest", false, crate::contract::tooltip::DELAY);
}
if crate::contract::overlay::dwell(&ctx, &mut *cx.core.memory, id, "drag rest", target.is_some(), crate::contract::tooltip::DELAY)
&& let Some(row) = target
{