X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cce442ba7c8506fda1b1bf350390ef06b0863150..790ba06b28f232abc42c4ed784df4b86bfbfe5e6:/src/motif/window.cpp diff --git a/src/motif/window.cpp b/src/motif/window.cpp index 30f5695703..ba7350acb3 100644 --- a/src/motif/window.cpp +++ b/src/motif/window.cpp @@ -2655,22 +2655,12 @@ bool wxTranslateMouseEvent(wxMouseEvent& wxevent, wxWindow *win, Widget widget, { // 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 {