Respect swapped mouse buttons in GUI tests (PR #26723)

6 views
Skip to first unread message

Richard Thomson

unread,
Jul 21, 2026, 11:43:14 PM (20 hours ago) Jul 21
to wx-...@googlegroups.com, Subscribed

Add primary and secondary mouse-button helpers to the test harness and use them in wxUIActionSimulator-based GUI tests instead of relying on physical left and right buttons.

Document the convention for new GUI tests.


You can view, comment on, or merge this pull request online at:

  https://github.com/wxWidgets/wxWidgets/pull/26723

Commit Summary

  • 212214b Respect swapped mouse buttons in GUI tests

File Changes

(8 files)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26723@github.com>

Richard Thomson

unread,
Jul 21, 2026, 11:43:37 PM (20 hours ago) Jul 21
to wx-...@googlegroups.com, Subscribed
LegalizeAdulthood left a comment (wxWidgets/wxWidgets#26723)

Without this, I have to unswap my mouse buttons for the GUI tests to pass.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26723/c5041596562@github.com>

VZ

unread,
6:51 PM (1 hour ago) 6:51 PM
to wx-...@googlegroups.com, Subscribed

@vadz commented on this pull request.

I'm not sure if this is the best way to do it, shouldn't we just translate LEFT to RIGHT inside wxMSW wxUIActionSimulator implementation if the mouse buttons are swapped? It wouldn't require any changes to the code (maybe just a mention in the docs) and seems simpler.


In include/wx/uiaction.h:

>  private:
+    static bool MouseButtonsSwapped()
+        { return wxSystemSettings::GetMetric(wxSYS_SWAP_BUTTONS) != 0; }

This should be moved to src/common/uiactioncmn.cpp to avoid including wx/settings.h from here.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26723/review/4759336092@github.com>

Reply all
Reply to author
Forward
0 new messages