From 3cb98121f299f3d4a96830d6843c800ac269aca9 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 27 Sep 2003 13:58:10 +0000 Subject: [PATCH] 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 --- src/unix/displayx11.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/unix/displayx11.cpp b/src/unix/displayx11.cpp index aae5896769..807c20e804 100644 --- a/src/unix/displayx11.cpp +++ b/src/unix/displayx11.cpp @@ -92,7 +92,16 @@ int wxDisplayBase::GetFromPoint(const wxPoint &p) } else { - return 0; + wxSize size = wxGetDisplaySize(); + if (p.x >= 0 && + p.x <= size.GetWidth() && + p.y > 0 && + p.y <= size.GetHeight()) + { + return 0; + } + + return -1 } } -- 2.45.2