Skip to content

bugfix: Singular right-click logic now always executes after a double right-click#1454

Closed
Stubbjax wants to merge 2 commits intoTheSuperHackers:mainfrom
Stubbjax:fix-double-right-click-fallthrough
Closed

bugfix: Singular right-click logic now always executes after a double right-click#1454
Stubbjax wants to merge 2 commits intoTheSuperHackers:mainfrom
Stubbjax:fix-double-right-click-fallthrough

Conversation

@Stubbjax
Copy link

This change fixes single right-click behaviour not being performed on a double right-click.

When a double right-click is performed, the singular right-click logic is potentially not executed as the isClick condition may return false. This is due to the double-click logic not updating the mouse down and mouse up timestamps that determine whether the user is holding down the mouse button (for camera dragging purposes). This means that there is a brief window after cancelling a context command (unit abilities, Beacon placement, General's Powers, etc.) that a unit will not perform the respective right-click action on the second right-click.

Note: Double-clicking very fast will cause the double-click to be within the first click's timestamp window and isClick will thus succeed. The issue is most noticeable when exiting context modes via a 'slower' double right-click.

@xezon
Copy link

xezon commented Aug 14, 2025

Is it correct and expected that the mouse up and down flags are not updated on double click or is that the real issue?

@xezon
Copy link

xezon commented Sep 17, 2025

Can you give example repro steps to trigger the issue?

@Stubbjax
Copy link
Author

Can you give example repro steps to trigger the issue?

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

@xezon
Copy link

xezon commented Sep 19, 2025

Ok. I investigated and found the root cause with unhandled message MSG_RAW_MOUSE_RIGHT_DOUBLE_CLICK. I have created new change #1605 to address that.

@Stubbjax
Copy link
Author

Ok. I investigated and found the root cause with unhandled message MSG_RAW_MOUSE_RIGHT_DOUBLE_CLICK. I have created new change #1605 to address that.

Very well. That's objectively better and simple enough to update here.

@Stubbjax Stubbjax force-pushed the fix-double-right-click-fallthrough branch from 5df7532 to 4466efc Compare September 20, 2025 02:32
@Stubbjax Stubbjax 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 20, 2025
@Stubbjax Stubbjax self-assigned this Sep 20, 2025
@xezon xezon closed this in #1605 Sep 23, 2025
@Stubbjax Stubbjax deleted the fix-double-right-click-fallthrough branch September 24, 2025 03:29
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