Skip to content

[GTK4] Send MouseDown before MouseDoubleClick on a double click - #3748

Merged
akurtakov merged 1 commit into
eclipse-platform:masterfrom
akurtakov:gtk4-double-click-order
Oct 19, 2026
Merged

akurtakov merged 1 commit into
eclipse-platform:masterfrom
akurtakov:gtk4-double-click-order

Conversation

@akurtakov

@akurtakov akurtakov commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

On the second press of a double click GTK4 sent MouseDoubleClick before
MouseDown, and it sent MouseDoubleClick again on a third press. GTK3,
Win32 and Cocoa send MouseDown with count 2 first and then
MouseDoubleClick, so code that handles the press in MouseDown saw the
double click first. GTK3 sends no MouseDoubleClick for a third press.

Part of #3743.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Wayland deferral still reverses event delivery, and asynchronous dispatch prevents cancellation from claiming the gesture sequence.

2 open issues
What changed in this PR

Aligns GTK4 double-click dispatch with other SWT platforms, addressing part of #3743.

Changes:

  • Calls MouseDown before MouseDoubleClick.
  • Combines dispatch results and adds a disposal check.
File Description
bundles/​org.eclipse.swt/​Eclipse SWT/​gtk/​org/​eclipse/​swt/​widgets/​Control.java Updates GTK4 double-click event ordering and gesture-result handling.

Review effort: Balanced

Comment thread bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java Outdated
Comment thread bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java Outdated
@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Test Results (linux)

   514 files  ±0     514 suites  ±0   38m 33s ⏱️ - 2m 2s
 4 807 tests ±0   4 465 ✅ ±0    342 💤 ±0  0 ❌ ±0 
14 715 runs  ±0  13 333 ✅ ±0  1 382 💤 ±0  0 ❌ ±0 

Results for commit 9e43563. ± Comparison against base commit 6cb00ac.

♻️ This comment has been updated with latest results.

@akurtakov
akurtakov force-pushed the gtk4-double-click-order branch from d650929 to 891f1b5 Compare October 19, 2026 11:11
On the second press of a double click GTK4 sent MouseDoubleClick before
MouseDown, and it sent MouseDoubleClick again on a third press. GTK3,
Win32 and Cocoa send MouseDown with count 2 first and then
MouseDoubleClick, so code that handles the press in MouseDown saw the
double click first. GTK3 sends no MouseDoubleClick for a third press.

Part of eclipse-platform#3743.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Wayland deferred delivery still reverses the intended event order, and the promised cancellation handling is missing.

4 open issues

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The reported Wayland drag-detection path still leaves the second MouseDown delayed until after MouseDoubleClick.

4 open issues

Review effort: Balanced

@akurtakov
akurtakov merged commit 9990e64 into eclipse-platform:master Oct 19, 2026
18 checks passed
vogella added a commit to vogella/eclipse.platform.swt that referenced this pull request Oct 19, 2026
Takes upstream's GTK4 MouseDown before MouseDoubleClick (eclipse-platform#3748) in place of the fork's own version of that fix.

Assisted-by: multiple AI agents and layers of automated tooling 🤖
@akurtakov
akurtakov deleted the gtk4-double-click-order branch October 23, 2026 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants