From f2ebd959e6acb8b606355ccbc366e9b42bd5fea0 Mon Sep 17 00:00:00 2001 From: Ryan Norton Date: Sat, 13 Dec 2003 09:25:29 +0000 Subject: [PATCH] Brian Victor's Patch & Cleanups git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24804 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/unix/displayx11.cpp | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/src/unix/displayx11.cpp b/src/unix/displayx11.cpp index 4e1bb56b84..0a3a132c67 100644 --- a/src/unix/displayx11.cpp +++ b/src/unix/displayx11.cpp @@ -81,9 +81,9 @@ int wxDisplayBase::GetFromPoint(const wxPoint &p) for (i = 0; i < numscreens; ++i) { if (p.x >= screenarr[i].x_org && - p.x <= screenarr[i].x_org + screenarr[i].width && + p.x < screenarr[i].x_org + screenarr[i].width && p.y >= screenarr[i].y_org && - p.y <= screenarr[i].y_org + screenarr[i].height) + p.y < screenarr[i].y_org + screenarr[i].height) { which_screen = i; } @@ -96,9 +96,9 @@ int wxDisplayBase::GetFromPoint(const wxPoint &p) { wxSize size = wxGetDisplaySize(); if (p.x >= 0 && - p.x <= size.GetWidth() && - p.y > 0 && - p.y <= size.GetHeight()) + p.x < size.GetWidth() && + p.y >= 0 && + p.y < size.GetHeight()) { return 0; } @@ -256,6 +256,22 @@ bool wxDisplay::ChangeMode(const wxVideoMode& mode) return false; } } + /* + //Brian Victor's patch (X11 can't change bit depth yet), here for reference + Display *disp = (Display*)wxGetDisplay(); + int count_return; + int* depths = XListDepths(disp, 0, &count_return); + wxArrayVideoModes modes; + if (depths) + { + int x; + for (x = 0; x < count_return; ++x) + { + modes.Add(wxVideoMode(m_priv->m_rect.GetWidth(), m_priv->m_rect.GetHeight(), depths[x])); + } + } + return modes; + */ } #endif /* wxUSE_DISPLAY */ -- 2.45.2