From e62d77e7d17ec2bad73953355fba650afa68f58e Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Wed, 29 Dec 2010 23:07:05 +0100 Subject: [PATCH] Fix ICS context menu for JAWS The Ctrl+R key did select text at the mouse pointer in stead of at the curser, now that up and down-click were combined. --- winboard/winboard.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/winboard/winboard.c b/winboard/winboard.c index e37c629..11a5d28 100644 --- a/winboard/winboard.c +++ b/winboard/winboard.c @@ -6901,7 +6901,8 @@ ConsoleTextSubclass(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) SendMessage(hInput, message, wParam, lParam); } return 0; - } // [HGM] navigate: for Ctrl+R, flow into nex case (moved up here) to summon up menu + } // [HGM] navigate: for Ctrl+R, flow into next case (moved up here) to summon up menu + lParam = -1; case WM_RBUTTONDOWN: if (!(GetKeyState(VK_SHIFT) & ~1)) { /* Move selection here if it was empty */ @@ -6910,7 +6911,7 @@ ConsoleTextSubclass(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) pt.y = HIWORD(lParam); SendMessage(hwnd, EM_EXGETSEL, 0, (LPARAM)&sel); if (sel.cpMin == sel.cpMax) { - sel.cpMin = SendMessage(hwnd, EM_CHARFROMPOS, 0, (LPARAM)&pt); /*doc is wrong*/ + if(lParam != -1) sel.cpMin = SendMessage(hwnd, EM_CHARFROMPOS, 0, (LPARAM)&pt); /*doc is wrong*/ sel.cpMax = sel.cpMin; SendMessage(hwnd, EM_EXSETSEL, 0, (LPARAM)&sel); } -- 1.7.0.4