]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/window.cpp
-fix for a bug in parsing tag's properties with common suffixes
[wxWidgets.git] / src / motif / window.cpp
index 5e39ed8eef01a2ad7136062d6bc8ae3df65d6ef5..ba7350acb3729372804f170208a9e5c44d147232 100644 (file)
@@ -2099,22 +2099,21 @@ static void wxCanvasInputEvent(Widget drawingArea,
                     {
                         // I have a dclick
                         canvas->SetLastClick(0, ts);
                     {
                         // I have a dclick
                         canvas->SetLastClick(0, ts);
-                        switch ( eventType )
+
+                        wxEventType typeDouble;
+                        if ( eventType == wxEVT_LEFT_DOWN )
+                            typeDouble = wxEVT_LEFT_DCLICK;
+                        else if ( eventType == wxEVT_MIDDLE_DOWN )
+                            typeDouble = wxEVT_MIDDLE_DCLICK;
+                        else if ( eventType == wxEVT_RIGHT_DOWN )
+                            typeDouble = wxEVT_RIGHT_DCLICK;
+                        else
+                            typeDouble = wxEVT_NULL;
+
+                        if ( typeDouble != wxEVT_NULL )
                         {
                         {
-                        case wxEVT_LEFT_DOWN:
-                            wxevent.SetEventType(wxEVT_LEFT_DCLICK);
-                            break;
-                        case wxEVT_MIDDLE_DOWN:
-                            wxevent.SetEventType(wxEVT_MIDDLE_DCLICK);
-                            break;
-                        case wxEVT_RIGHT_DOWN:
-                            wxevent.SetEventType(wxEVT_RIGHT_DCLICK);
-                            break;
-
-                        default :
-                            break;
+                            wxevent.SetEventType(typeDouble);
                         }
                         }
-
                     }
                     else
                     {
                     }
                     else
                     {
@@ -2656,22 +2655,12 @@ bool wxTranslateMouseEvent(wxMouseEvent& wxevent, wxWindow *win, Widget widget,
                 {
                     // I have a dclick
                     win->SetLastClick(0, ts);
                 {
                     // I have a dclick
                     win->SetLastClick(0, ts);
-                    switch ( eventType )
-                    {
-                        case wxEVT_LEFT_DOWN:
-                            eventType = wxEVT_LEFT_DCLICK;
-                            break;
-                        case wxEVT_MIDDLE_DOWN:
-                            eventType = wxEVT_MIDDLE_DCLICK;
-                            break;
-                        case wxEVT_RIGHT_DOWN:
-                            eventType = wxEVT_RIGHT_DCLICK;
-                            break;
-
-                        default :
-                            break;
-                    }
-                    
+                    if ( eventType == wxEVT_LEFT_DOWN )
+                        eventType = wxEVT_LEFT_DCLICK;
+                    else if ( eventType == wxEVT_MIDDLE_DOWN )
+                        eventType = wxEVT_MIDDLE_DCLICK;
+                    else if ( eventType == wxEVT_RIGHT_DOWN )
+                        eventType = wxEVT_RIGHT_DCLICK;
                 }
                 else
                 {
                 }
                 else
                 {
@@ -2984,7 +2973,7 @@ void wxWindow::ChangeFont(bool keepOriginalSize)
 wxWindow *wxGetActiveWindow()
 {
     // TODO
 wxWindow *wxGetActiveWindow()
 {
     // TODO
-    wxFAIL_MSG(_("Not implemented"));
+    wxFAIL_MSG("Not implemented");
     return NULL;
 }
 
     return NULL;
 }
 
@@ -2992,9 +2981,7 @@ wxWindow *wxGetActiveWindow()
 // position.
 wxWindow* wxFindWindowAtPointer(wxPoint& pt)
 {
 // position.
 wxWindow* wxFindWindowAtPointer(wxPoint& pt)
 {
-    pt = wxGetMousePosition();
-    wxWindow* found = wxFindWindowAtPoint(pt);
-    return found;
+    return wxFindWindowAtPoint(wxGetMousePosition());
 }
 
 // Get the current mouse position.
 }
 
 // Get the current mouse position.