Fall back on ::GetMessagePos() if ::GetCursorPos() fails under MSW.
In some rare but reproducible cases GetCursorPos() can fail and return without filling in the provided point. Fall back to GetMessagePos() if this happens: this is not ideal but clearly better than using uninitialized position or hard coding something like (0, 0). Closes #13664. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69758 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -923,6 +923,9 @@ WXDLLIMPEXP_BASE wxWinVersion wxGetWinVersion();
|
||||
extern HCURSOR wxGetCurrentBusyCursor(); // from msw/utils.cpp
|
||||
extern const wxCursor *wxGetGlobalCursor(); // from msw/cursor.cpp
|
||||
|
||||
// GetCursorPos can fail without populating the POINT. This falls back to GetMessagePos.
|
||||
WXDLLIMPEXP_CORE void wxGetCursorPosMSW(POINT* pt);
|
||||
|
||||
WXDLLIMPEXP_CORE void wxGetCharSize(WXHWND wnd, int *x, int *y, const wxFont& the_font);
|
||||
WXDLLIMPEXP_CORE void wxFillLogFont(LOGFONT *logFont, const wxFont *font);
|
||||
WXDLLIMPEXP_CORE wxFont wxCreateFontFromLogFont(const LOGFONT *logFont);
|
||||
|
Reference in New Issue
Block a user