]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/notebook.cpp
revert unintended changes in previous commit
[wxWidgets.git] / src / gtk / notebook.cpp
index 2e144a6a0b72b18f9cd0d4b0ffadee663b76b58c..25efc437f89210899e493431d50624581219fa53 100644 (file)
@@ -795,7 +795,22 @@ int wxNotebook::HitTest(const wxPoint& pt, long *flags) const
     }
 
     if ( flags )
+    {
         *flags = wxNB_HITTEST_NOWHERE;
+        wxWindowBase * page = GetCurrentPage();
+        if ( page )
+        {
+            // rect origin is in notebook's parent coordinates
+            wxRect rect = page->GetRect();
+
+            // adjust it to the notebook's coordinates
+            wxPoint pos = GetPosition();
+            rect.x -= pos.x;
+            rect.y -= pos.y;
+            if ( rect.Inside( pt ) )
+                *flags |= wxNB_HITTEST_ONPAGE;
+        }
+    }
 
     return wxNOT_FOUND;
 }