X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/42841dfcaddc6045ffc618acbb620b1fde1bc618..617bfeecfeeaecec2443d10545879d114c4dff0d:/src/generic/sashwin.cpp diff --git a/src/generic/sashwin.cpp b/src/generic/sashwin.cpp index e6469b11ee..b9e554da14 100644 --- a/src/generic/sashwin.cpp +++ b/src/generic/sashwin.cpp @@ -11,10 +11,6 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "sashwin.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -30,10 +26,12 @@ #include "wx/settings.h" #endif -#include +#include "wx/math.h" + #include #include "wx/dcscreen.h" +#include "wx/dcclient.h" #include "wx/sashwin.h" #include "wx/laywin.h" @@ -97,7 +95,7 @@ void wxSashWindow::OnPaint(wxPaintEvent& WXUNUSED(event)) void wxSashWindow::OnMouseEvent(wxMouseEvent& event) { - wxCoord x, y; + wxCoord x = 0, y = 0; event.GetPosition(&x, &y); wxSashEdgePosition sashHit = SashHitTest(x, y); @@ -279,11 +277,11 @@ void wxSashWindow::OnMouseEvent(wxMouseEvent& event) dragRect = wxRect(x, y, newWidth, newHeight); - wxSashEvent event(GetId(), edge); - event.SetEventObject(this); - event.SetDragStatus(status); - event.SetDragRect(dragRect); - GetEventHandler()->ProcessEvent(event); + wxSashEvent eventSash(GetId(), edge); + eventSash.SetEventObject(this); + eventSash.SetDragStatus(status); + eventSash.SetDragRect(dragRect); + GetEventHandler()->ProcessEvent(eventSash); } else if ( event.LeftUp() ) {