fixed bug in wxDisplay::GetFromPoint() when Xinerama is not used (patch 813543)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23967 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -91,9 +91,18 @@ int wxDisplayBase::GetFromPoint(const wxPoint &p)
|
|||||||
return which_screen;
|
return which_screen;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
wxSize size = wxGetDisplaySize();
|
||||||
|
if (p.x >= 0 &&
|
||||||
|
p.x <= size.GetWidth() &&
|
||||||
|
p.y > 0 &&
|
||||||
|
p.y <= size.GetHeight())
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return -1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wxDisplay::wxDisplay(size_t index) : wxDisplayBase ( index ), m_priv( new wxDisplayUnixPriv )
|
wxDisplay::wxDisplay(size_t index) : wxDisplayBase ( index ), m_priv( new wxDisplayUnixPriv )
|
||||||
|
Reference in New Issue
Block a user