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:
@@ -113,7 +113,7 @@ bool wxCheckForInterrupt(wxWindow *wnd)
|
||||
void wxGetMousePosition( int* x, int* y )
|
||||
{
|
||||
POINT pt;
|
||||
GetCursorPos( & pt );
|
||||
wxGetCursorPosMSW( & pt );
|
||||
if ( x ) *x = pt.x;
|
||||
if ( y ) *y = pt.y;
|
||||
}
|
||||
|
Reference in New Issue
Block a user