Skip to content

Desktop: Fix drag followed by a click causing a double click#3721

Merged
timon-schelling merged 4 commits intoGraphiteEditor:masterfrom
he1senbrg:fix-drag-click
Mar 24, 2026
Merged

Desktop: Fix drag followed by a click causing a double click#3721
timon-schelling merged 4 commits intoGraphiteEditor:masterfrom
he1senbrg:fix-drag-click

Conversation

@he1senbrg
Copy link
Copy Markdown
Contributor

Before

drag-click-before.mp4

After

drag-click-after.mp4

Closes #3714

@timon-schelling
Copy link
Copy Markdown
Member

timon-schelling commented Feb 12, 2026

I think an easier and cleaner solution would be resetting both up_ and down_count whenever xy_delta is to big. down position is already in the record and should not be duplicated.

@he1senbrg
Copy link
Copy Markdown
Contributor Author

@timon-schelling I might be wrong, but from what I understood the last time a value is stored in position would be when a click was released, right? And when the next click happens within the conditions it registers as a double click. So, even if we reset up_ and down_count wouldn't the next click still register as double as the previous one was single (either via reset or because of drag)?

@timon-schelling
Copy link
Copy Markdown
Member

I would need to spend more than 2 min looking at the code, but from what I remember it should be possible to split up and down positions and use both of them to figure out the xy delta with each and abort the double click when either the down or up position is to far (fine to add that to the record).

@Keavon
Copy link
Copy Markdown
Member

Keavon commented Feb 14, 2026

Marking as draft while awaiting changes.

@Keavon Keavon marked this pull request as draft February 14, 2026 07:37
@he1senbrg
Copy link
Copy Markdown
Contributor Author

@timon-schelling Sorry for the delay. Can i remove position from ClickRecord and add down_position and up_position to it so that these can be individually tracked?

@he1senbrg he1senbrg marked this pull request as ready for review February 19, 2026 15:38
@he1senbrg
Copy link
Copy Markdown
Contributor Author

@timon-schelling Could you please review the changes

@Keavon
Copy link
Copy Markdown
Member

Keavon commented Mar 5, 2026

I'd like to give this a QA test before merging.

@timon-schelling
Copy link
Copy Markdown
Member

@Keavon ok, I think now I'm fine with the patch.

@Keavon Keavon force-pushed the master branch 6 times, most recently from d6228da to e58c1de Compare March 16, 2026 23:03
@Keavon Keavon force-pushed the master branch 5 times, most recently from 9b97ab7 to 2e842cb Compare March 19, 2026 11:00
bug: quadruple bypassing time and distance check logic
@timon-schelling timon-schelling added this pull request to the merge queue Mar 24, 2026
Merged via the queue into GraphiteEditor:master with commit 36366b3 Mar 24, 2026
9 checks passed
@he1senbrg he1senbrg deleted the fix-drag-click branch March 24, 2026 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

On desktop, a drag followed by a click causes a double click

3 participants