Index: src/manager.cpp
===================================================================
--- src/manager.cpp	(revision 438)
+++ src/manager.cpp	(working copy)
@@ -20,7 +20,20 @@
 #include <wx/image.h>
 #include "manager.h"
 
+#define WXAUI_USE_WXGETMOUSESTATE 0
+#define HAVE_WXGETMOUSESTATE
 
+#ifdef WXAUI_USE_WXGETMOUSESTATE
+#ifndef HAVE_WXGETMOUSESTATE
+// We want to use WXGETMOUSESTATE but we haven't got it in the wx library - presume there is an include file
+#include "wxmousestate.h"
+#endif // HAVE_WXGETMOUSESTATE
+#else
+#ifdef __WXGTK__
+extern "C" { void* gdk_window_get_pointer(void*, int*, int*, unsigned int*); }
+#endif // __WXGTK__
+#endif // WXAUI_USE_WXGETMOUSESTATE
+
 // -- various array and event implementations --
 
 #include <wx/arrimpl.cpp>
@@ -570,10 +583,6 @@
 #define wxFloatingPaneBaseClass wxFrame
 #endif
 
-#ifdef __WXGTK__
-extern "C" { void* gdk_window_get_pointer(void*, int*, int*, unsigned int*); }
-#endif
-
 class wxFloatingPane : public wxFloatingPaneBaseClass
 {
 public:
@@ -756,6 +765,9 @@
     // functionality to wxWidgets itself)
     static bool isMouseDown()
     {
+#ifdef WXAUI_USE_WXGETMOUSESTATE
+        return wxGetMouseState().LeftDown();
+#else
         #ifdef __WXMSW__
         return (GetKeyState( VK_LBUTTON ) & (1<<15)) ? true : false;
         #endif
@@ -769,8 +781,9 @@
         #endif
         
         #ifdef __WXMAC__
-        return GetCurrentEventButtonState() & 0x01 ;
+        return GetCurrentButtonState() & 0x01 ;
         #endif
+#endif
     }
 
 private:
