From a73b093fffc86c592d371d5917e25954e40cc219 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Mon, 9 Nov 2026 20:29:01 +0100 Subject: [PATCH] Windows debugger: Don't edit a register on a double click on the category tabs Releasing the button over the tabs also selected the top visible register, so a double click there opened the change value dialog for it. Co-Authored-By: Claude Opus 5.5 --- Windows/Debugger/CtrlRegisterList.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Windows/Debugger/CtrlRegisterList.cpp b/Windows/Debugger/CtrlRegisterList.cpp index b538f5b646..f7d8b97db4 100644 --- a/Windows/Debugger/CtrlRegisterList.cpp +++ b/Windows/Debugger/CtrlRegisterList.cpp @@ -100,7 +100,12 @@ LRESULT CALLBACK CtrlRegisterList::wndProc(HWND hwnd, UINT msg, WPARAM wParam, L case WM_MOUSEMOVE: ccp->onMouseMove(wParam,lParam,(lmbDown?1:0) | (rmbDown?2:0)); break; case WM_LBUTTONUP: lmbDown=false; ccp->onMouseUp(wParam,lParam,1); break; case WM_RBUTTONUP: rmbDown=false; ccp->onMouseUp(wParam,lParam,2); break; - case WM_LBUTTONDBLCLK: ccp->editRegisterValue(); break; + case WM_LBUTTONDBLCLK: + // Not on the category tabs, which aren't a register. + if ((s16)HIWORD(lParam) > ccp->rowHeight) { + ccp->editRegisterValue(); + } + break; case WM_SETFOCUS: SetFocus(hwnd); ccp->hasFocus=true; @@ -651,7 +656,9 @@ void CtrlRegisterList::onMouseUp(WPARAM wParam, LPARAM lParam, int button) } if (x>16) { - selection=yToIndex(y); + if (y > rowHeight) { + selection=yToIndex(y); + } selecting=false; ReleaseCapture(); redraw();