X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b1b3ddd840a507f3ca85379bfa832f2b0c9105d6..b93aba841c8aadce695e7f1d8d8ecd3028cb2eee:/src/unix/displayx11.cpp diff --git a/src/unix/displayx11.cpp b/src/unix/displayx11.cpp index 78a1656812..20cd747e13 100644 --- a/src/unix/displayx11.cpp +++ b/src/unix/displayx11.cpp @@ -9,7 +9,7 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "display.h" #endif @@ -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 } } @@ -135,7 +144,7 @@ int wxDisplay::GetDepth() const wxString wxDisplay::GetName() const { - return ""; + return wxEmptyString; } #endif /* wxUSE_DISPLAY */