From: H.G. Muller Date: Wed, 29 Dec 2010 22:07:05 +0000 (+0100) Subject: Fix ICS context menu for JAWS X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=e62d77e7d17ec2bad73953355fba650afa68f58e;p=xboard.git 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. --- 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); }