diff --git a/Windows/Debugger/CtrlRegisterList.cpp b/Windows/Debugger/CtrlRegisterList.cpp index 82b5847f40..b538f5b646 100644 --- a/Windows/Debugger/CtrlRegisterList.cpp +++ b/Windows/Debugger/CtrlRegisterList.cpp @@ -559,8 +559,9 @@ void CtrlRegisterList::editRegisterValue() void CtrlRegisterList::onMouseDown(WPARAM wParam, LPARAM lParam, int button) { int x = (s16)LOWORD(lParam); - int y = (s16)HIWORD(lParam); - if (x>16) + int y = (s16)HIWORD(lParam); + // The left margin only belongs to the register rows, the category tabs span the whole width. + if (x > 16 || y <= rowHeight) { oldSelection=selection; @@ -655,6 +656,11 @@ void CtrlRegisterList::onMouseUp(WPARAM wParam, LPARAM lParam, int button) ReleaseCapture(); redraw(); } + else + { + // A click on the category tabs captures the mouse too, at any x. + ReleaseCapture(); + } } void CtrlRegisterList::onMouseMove(WPARAM wParam, LPARAM lParam, int button)