Skip to content
Snippets Groups Projects
Commit 1a3e8507 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Use mouse button release rather than press to activate a hotspot

As described in issue #412, when using extended mouse coordinate (SGR) mode, the mouse button release sequence would be received by the BBS after the hotspot-activated menu option was executed and then that button release sequence possibly passed through to the a child script or program that didn't know how to handle or ignore it.

To resolve this, the BBS now ignores ("eats") the mouse button *press* sequence and only acts upon the mouse button *release* sequence. This is more aligned with how button-clicks work in mouse-control/GUI applications anyway.
parent 280f16f4
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #3148 passed
......@@ -419,7 +419,7 @@ char sbbs_t::handle_ctrlkey(char ch, long mode)
--y;
lprintf(LOG_DEBUG, "SGR Mouse button (0x%02X) %s reported at: %u x %u"
,button, ch == 'M' ? "PRESS" : "RELEASE", x, y);
if(button == 0 && ch == 'M') { // Left-button press
if(button == 0 && ch == 'm') { // Left-button release
list_node_t* node;
for(node = mouse_hotspots.first; node != NULL; node = node->next) {
struct mouse_hotspot* spot = (struct mouse_hotspot*)node->data;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment