An application subclasses edit control and crashes on unexpected WM_TIMER messages. A timer was
added a long time ago and it was for auto scrolling the view when the cursor is outside of the
client area. However, with a EDIT_EM_ScrollCaret() call in EDIT_WM_MouseMove(), the view can be
scrolled to the correct position automatically. So the timer is not necessary at all. This is tested
manually with a long text in the edit control with notepad on XP, Win7 and Win10. Before this patch,
the caret will move backwards every 100ms when the clicking the left mouse button on the bottom of
the text and then dragging the cursor upwards and outside of the client area. After this, the
behavior is the same as native.
There are cases in Windows10+ where the WM_PASTE message doesn't paste
the content of the clipboard.
This appeared in testing:
- almost always just after (for a couple of milliseconds) setting new
content into the clipboard and closing it.
- in some unrelated rare occasions (like once for 400 runs).
It looks like another (installed) process had opened the clipboard and
forbids the paste command.
As WM_PASTE doesn't return success/error status, workaround it by
wrapping the WM_PASTE command into a helper, and retry when the
clipboard's content hasn't been pasted.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53276
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53277
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
As the clipboard is a shared resource, we cannot expect that
no other app hasn't openeded it.
So wrap clipboard access with a retry feature in case of failure.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Starting with Win10, height of multiline edit controls no longer seems
to be hardwired to a multiple of the font height (when larger than
font height).
- Adapt the tests accordingly (detecting how to compute the expected
height of a control).
- Extend the ranges of the tested heights.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52152
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
We are still using exported string functions internally,
and that caused mismatches after recent incomplete switching to crt functions.
There is also no evidence that crt functions are used at all there,
so for now switch back to fix mismatching calls.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Changed MCHITTESTINFO.cbSize to fall back to V1:
From the rest of the tests, it looks like the extended size
of MCHITTESTINFO requires loading common controls V6, which is
only done afterwards in the tests.
Improved lookup of an unselected day.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50097
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>