]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/window.cpp
added rtti info (python problem)
[wxWidgets.git] / src / mac / window.cpp
index 9d9fdb5cc6e1a2208b6bf25cb708a92df80dd327..0708958546a2dbba84d78b2c6e89c35c4d8b4ee1 100644 (file)
@@ -124,6 +124,8 @@ void wxWindowMac::Init()
 
     m_hScrollBar = NULL ;
     m_vScrollBar = NULL ;
+
+    m_label = wxEmptyString;
 }
 
 // Destructor
@@ -676,12 +678,12 @@ wxPoint wxWindowMac::GetClientAreaOrigin() const
     return wxPoint(MacGetLeftBorderSize(  ) , MacGetTopBorderSize(  ) );
 }
 
-void wxWindow::SetTitle(const wxString& title)
+void wxWindowMac::SetTitle(const wxString& title)
 {
     m_label = title ;
 }
 
-wxString wxWindow::GetTitle() const
+wxString wxWindowMac::GetTitle() const
 {
     return m_label ;
 }
@@ -1386,6 +1388,7 @@ bool wxWindowMac::MacGetWindowFromPoint( const wxPoint &screenpoint , wxWindowMa
 }
 
 extern int wxBusyCursorCount ;
+static wxWindow *gs_lastWhich = NULL;
 
 bool wxWindowMac::MacDispatchMouseEvent(wxMouseEvent& event)
 {
@@ -1438,6 +1441,23 @@ bool wxWindowMac::MacDispatchMouseEvent(wxMouseEvent& event)
         wxToolTip::RelayEvent( this , event);
 #endif // wxUSE_TOOLTIPS
 
+    if (gs_lastWhich != this)
+    {
+        gs_lastWhich = this;
+        
+        // Double clicks must always occur on the same window
+        if (event.GetEventType() == wxEVT_LEFT_DCLICK)
+            event.SetEventType( wxEVT_LEFT_DOWN );
+        if (event.GetEventType() == wxEVT_RIGHT_DCLICK)
+            event.SetEventType( wxEVT_RIGHT_DOWN );
+            
+        // Same for mouse up events
+        if (event.GetEventType() == wxEVT_LEFT_UP)
+            return TRUE;
+        if (event.GetEventType() == wxEVT_RIGHT_UP)
+            return TRUE;
+    }
+
     GetEventHandler()->ProcessEvent( event ) ;
 
     return TRUE;