Skip to content

Conversation

@xezon
Copy link

@xezon xezon commented Sep 19, 2025

This change is an alternative fix to #1454 and fixes single right-click behavior not being performed on a double right-click.

What happens is that MSG_RAW_MOUSE_RIGHT_DOUBLE_CLICK implictly is a MSG_RAW_MOUSE_RIGHT_BUTTON_DOWN message, but it is not handled the same way as MSG_RAW_MOUSE_RIGHT_BUTTON_DOWN and therefore loses the mouse click timing in CommandTranslator.

MSG_RAW_MOUSE_RIGHT_BUTTON_UP is always sent on both single and double click and therefore requires no special attention.

Repro Steps

  1. Enable "Alternative Mouse Setup" in Options Menu
  2. Start a new game
  3. Start building a Barracks
  4. Number the Command Center and Barracks to groups 1 and 2
  5. Move the cursor to an empty location
  6. Without moving the cursor, rapidly press 1 → right-click and then 2 → right-click to place a rally point for each building
  7. Observe only one building's rally point is placed if done quickly enough

TODO

  • Replicate in Generals

@xezon xezon added Bug Something is not working right, typically is user facing Minor Severity: Minor < Major < Critical < Blocker Gen Relates to Generals ZH Relates to Zero Hour Input labels Sep 19, 2025
@xezon xezon changed the title fix(input): Fix broken single click command after right mouse double click bugfix(input): Fix broken single click command after right mouse double click Sep 20, 2025
Copy link

@Skyaero42 Skyaero42 left a comment

Choose a reason for hiding this comment

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

Ok

@xezon
Copy link
Author

xezon commented Sep 23, 2025

Replicated in Generals without conflict.

@xezon xezon merged commit cd86cc4 into TheSuperHackers:main Sep 23, 2025
18 checks passed
@xezon xezon deleted the xezon/fix-right-double-click branch September 23, 2025 07:19
fbraz3 pushed a commit to fbraz3/GeneralsX that referenced this pull request Nov 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something is not working right, typically is user facing Gen Relates to Generals Input Minor Severity: Minor < Major < Critical < Blocker ZH Relates to Zero Hour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants