]> git.saurik.com Git - wxWidgets.git/commitdiff
Brian Victor's Patch & Cleanups
authorRyan Norton <wxprojects@comcast.net>
Sat, 13 Dec 2003 09:25:29 +0000 (09:25 +0000)
committerRyan Norton <wxprojects@comcast.net>
Sat, 13 Dec 2003 09:25:29 +0000 (09:25 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24804 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/unix/displayx11.cpp

index 4e1bb56b841fb0f208896786ef927b3d2ed62044..0a3a132c67353d5b5250a34c9105dba664354629 100644 (file)
@@ -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 */