Avoid assert dialog in ClientToScreen()/ScreenToClient(), it's just too annoying
(cherry picked from commit e3f117c4f3
)
This commit is contained in:
@@ -3201,7 +3201,11 @@ void wxWindowGTK::DoClientToScreen( int *x, int *y ) const
|
||||
return;
|
||||
}
|
||||
|
||||
wxCHECK_RET(source, "ClientToScreen failed on unrealized window");
|
||||
if (source == NULL)
|
||||
{
|
||||
wxLogDebug("ClientToScreen cannot work when toplevel window is not shown");
|
||||
return;
|
||||
}
|
||||
|
||||
int org_x = 0;
|
||||
int org_y = 0;
|
||||
@@ -3271,7 +3275,11 @@ void wxWindowGTK::DoScreenToClient( int *x, int *y ) const
|
||||
return;
|
||||
}
|
||||
|
||||
wxCHECK_RET(source, "ScreenToClient failed on unrealized window");
|
||||
if (source == NULL)
|
||||
{
|
||||
wxLogDebug("ScreenToClient cannot work when toplevel window is not shown");
|
||||
return;
|
||||
}
|
||||
|
||||
int org_x = 0;
|
||||
int org_y = 0;
|
||||
|
Reference in New Issue
Block a user