[PR #10138] [MERGED] Pass through double clicks and hover events in Win32 mouse mode #27915

Open
opened 2026-01-31 09:25:08 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/10138
Author: @PankajBhojwani
Created: 5/20/2021
Status: Merged
Merged: 5/24/2021
Merged by: @undefined

Base: mainHead: dev/pabhoj/fix_mouse_mode


📝 Commits (10+)

📊 Changes

3 files changed (+122 additions, -10 deletions)

View changed files

📝 src/terminal/parser/InputStateMachineEngine.cpp (+39 -8)
📝 src/terminal/parser/InputStateMachineEngine.hpp (+7 -2)
📝 src/terminal/parser/ut_parser/InputEngineTest.cpp (+76 -0)

📄 Description

Each mouse-down event's time and position is now stored, and if we
process a left-mouse-down event at the same position as the previous one
and within the double click time we set the double click flag.

Also adds a case statement to _UpdateSGRMouseButtonState so that we
send hover events instead of ignoring them.

Note: The 'right-click menu in far manager shows up at the wrong
location' bug still exists with this, as it seems to use the cursor
position as told by user32.

Related to #376

Validation Steps Performed

Double click in far manager works, hover in far manager works (hovering
over items in the right-click menu correctly highlights them)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/10138 **Author:** [@PankajBhojwani](https://github.com/PankajBhojwani) **Created:** 5/20/2021 **Status:** ✅ Merged **Merged:** 5/24/2021 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/pabhoj/fix_mouse_mode` --- ### 📝 Commits (10+) - [`de26171`](https://github.com/microsoft/terminal/commit/de26171020aea93947855f225075bf5d93366f84) double click - [`f7ac101`](https://github.com/microsoft/terminal/commit/f7ac101c94b7a3aac46ad0a1fbb0fd7643db948b) spell - [`3f73401`](https://github.com/microsoft/terminal/commit/3f734017489c939cd52335ea928e7451f871ca9a) store double click time - [`6e88392`](https://github.com/microsoft/terminal/commit/6e883922e4b580dd1b057b93c758384bd524088b) hover - [`dc35533`](https://github.com/microsoft/terminal/commit/dc355331778b836e2ef5f17f2f3b04df8ee02aa2) Std chrono - [`ca7b902`](https://github.com/microsoft/terminal/commit/ca7b9025e1efccc9ca55bd131c2776fbca881e93) ...what - [`79b29bb`](https://github.com/microsoft/terminal/commit/79b29bbc9aaec3974629677dcab8297fc8904d76) how bout now - [`d24b870`](https://github.com/microsoft/terminal/commit/d24b87036d0102f6f739b2ef070db1c08241d441) remove noexcept - [`607c5cb`](https://github.com/microsoft/terminal/commit/607c5cb75611c16f4bf2f999c3ee948079bde071) < - [`531c076`](https://github.com/microsoft/terminal/commit/531c076f4fe1c54bb18c928b585bd21c41efef11) til::point ### 📊 Changes **3 files changed** (+122 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `src/terminal/parser/InputStateMachineEngine.cpp` (+39 -8) 📝 `src/terminal/parser/InputStateMachineEngine.hpp` (+7 -2) 📝 `src/terminal/parser/ut_parser/InputEngineTest.cpp` (+76 -0) </details> ### 📄 Description Each mouse-down event's time and position is now stored, and if we process a left-mouse-down event at the same position as the previous one and within the double click time we set the double click flag. Also adds a case statement to `_UpdateSGRMouseButtonState` so that we send hover events instead of ignoring them. Note: The 'right-click menu in far manager shows up at the wrong location' bug still exists with this, as it seems to use the cursor position as told by user32. Related to #376 ## Validation Steps Performed Double click in far manager works, hover in far manager works (hovering over items in the right-click menu correctly highlights them) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:25:08 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#27915