git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20492
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
int x = (int)event.GetX(),
y = (int)event.GetY();
int x = (int)event.GetX(),
y = (int)event.GetY();
- // reset the cursor
-#if defined( __WXMOTIF__ ) || defined( __WXGTK__ ) || defined( __WXMAC__ )
- SetCursor(* wxSTANDARD_CURSOR);
-#elif defined(__WXMSW__)
- SetCursor(wxCursor());
+#if defined(__WXMSW__)
+ // SetCursor(wxCursor()); // Is this required?
#endif
if (GetWindowStyle() & wxSP_NOSASH)
#endif
if (GetWindowStyle() & wxSP_NOSASH)
{
if ( SashHitTest(x, y) )
{
{
if ( SashHitTest(x, y) )
{
m_dragMode = wxSPLIT_DRAG_DRAGGING;
m_dragMode = wxSPLIT_DRAG_DRAGGING;
+
+ // Capture mouse and set the cursor
+ CaptureMouse();
+ SetResizeCursor();
{
// We can stop dragging now and see what we've got.
m_dragMode = wxSPLIT_DRAG_NONE;
{
// We can stop dragging now and see what we've got.
m_dragMode = wxSPLIT_DRAG_NONE;
+
+ // Release mouse and unset the cursor
+ SetCursor(* wxSTANDARD_CURSOR);
// exit if unsplit after doubleclick
if ( !IsSplit() )
// exit if unsplit after doubleclick
if ( !IsSplit() )
} // left up && dragging
else if (event.Moving() && !event.Dragging())
{
} // left up && dragging
else if (event.Moving() && !event.Dragging())
{
- // Just change the cursor if required
+ // Just change the cursor as required
- }
-#if defined(__WXGTK__) || defined(__WXMSW__) || defined(__WXMAC__)
- {
- // We must set the normal cursor in MSW, because
- // if the child window doesn't have a cursor, the
- // parent's (splitter window) will be used, and this
- // must be the standard cursor.
-
- // where else do we unset the cursor?
SetCursor(* wxSTANDARD_CURSOR);
SetCursor(* wxSTANDARD_CURSOR);
}
else if (event.Dragging() && (m_dragMode == wxSPLIT_DRAG_DRAGGING))
{
}
else if (event.Dragging() && (m_dragMode == wxSPLIT_DRAG_DRAGGING))
{
-#if defined( __WXMSW__ ) || defined( __WXMAC__ )
- // Otherwise, the cursor sometimes reverts to the normal cursor
- // during dragging.
- SetResizeCursor();
-#endif // __WXMSW__
-
int diff = m_splitMode == wxSPLIT_VERTICAL ? x - m_oldX : y - m_oldY;
if ( !diff )
{
int diff = m_splitMode == wxSPLIT_VERTICAL ? x - m_oldX : y - m_oldY;
if ( !diff )
{