Re: [PATCH] riched20: Fix link notification conditions and add tests.
Alex Henrie <alexhenrie24(a)gmail.com> writes:
@@ -4121,6 +4121,10 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam, return 0; case WM_SETCURSOR: { + POINT cursor_pos; + if (wParam == (WPARAM)editor->hWnd && GetCursorPos(&cursor_pos) && + ScreenToClient(editor->hWnd, &cursor_pos)) + ME_LinkNotify(editor, msg, 0, MAKELPARAM(cursor_pos.x, cursor_pos.y));
Getting the current cursor position doesn't look right, it should be the message position. -- Alexandre Julliard julliard(a)winehq.org
2015-06-08 2:43 GMT-06:00 Alexandre Julliard <julliard(a)winehq.org>:
Alex Henrie <alexhenrie24(a)gmail.com> writes:
@@ -4121,6 +4121,10 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam, return 0; case WM_SETCURSOR: { + POINT cursor_pos; + if (wParam == (WPARAM)editor->hWnd && GetCursorPos(&cursor_pos) && + ScreenToClient(editor->hWnd, &cursor_pos)) + ME_LinkNotify(editor, msg, 0, MAKELPARAM(cursor_pos.x, cursor_pos.y));
Getting the current cursor position doesn't look right, it should be the message position.
The message does not include the cursor position. Look at how in the tests, I send WM_SETCURSOR with wParam set to the HWND and lParam set to 0. I will submit a try 2 that makes this more clear. -Alex
2015-06-08 11:03 GMT-06:00 Alex Henrie <alexhenrie24(a)gmail.com>:
2015-06-08 2:43 GMT-06:00 Alexandre Julliard <julliard(a)winehq.org>:
Alex Henrie <alexhenrie24(a)gmail.com> writes:
@@ -4121,6 +4121,10 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam, return 0; case WM_SETCURSOR: { + POINT cursor_pos; + if (wParam == (WPARAM)editor->hWnd && GetCursorPos(&cursor_pos) && + ScreenToClient(editor->hWnd, &cursor_pos)) + ME_LinkNotify(editor, msg, 0, MAKELPARAM(cursor_pos.x, cursor_pos.y));
Getting the current cursor position doesn't look right, it should be the message position.
The message does not include the cursor position. Look at how in the tests, I send WM_SETCURSOR with wParam set to the HWND and lParam set to 0. I will submit a try 2 that makes this more clear.
Alexandre, I answered your question. Why have you still not accepted this patch? -Alex
Alex Henrie <alexhenrie24(a)gmail.com> writes:
Alexandre,
I answered your question. Why have you still not accepted this patch?
It's clearer now, thanks. One last thing: please restore the original cursor position at the end of the test to avoid side effects. -- Alexandre Julliard julliard(a)winehq.org
participants (2)
-
Alex Henrie -
Alexandre Julliard