diff --git a/contrib/src/fl/bardragpl.cpp b/contrib/src/fl/bardragpl.cpp index 50ee1a43af..4e35ae422e 100644 --- a/contrib/src/fl/bardragpl.cpp +++ b/contrib/src/fl/bardragpl.cpp @@ -456,17 +456,6 @@ void cbBarDragPlugin::ShowHint( bool prevWasInClient ) { bool wasDocked = FALSE; - if ( mpDraggedBar->mState != wxCBAR_FLOATING && !mpCurPane ) - { - mpLayout->SetBarState( mpDraggedBar, wxCBAR_FLOATING, TRUE ); - } - else - if ( mpDraggedBar->mState == wxCBAR_FLOATING && mpCurPane ) - { - mpLayout->SetBarState( mpDraggedBar, wxCBAR_DOCKED_HORIZONTALLY, FALSE ); - - wasDocked = TRUE; - } if ( mpSrcPane->mProps.mRealTimeUpdatesOn == FALSE ) { @@ -510,6 +499,18 @@ void cbBarDragPlugin::ShowHint( bool prevWasInClient ) { // otherwise, if real-time updates option is ON + if ( mpDraggedBar->mState != wxCBAR_FLOATING && !mpCurPane ) + { + mpLayout->SetBarState( mpDraggedBar, wxCBAR_FLOATING, TRUE ); + } + else + if ( mpDraggedBar->mState == wxCBAR_FLOATING && mpCurPane ) + { + mpLayout->SetBarState( mpDraggedBar, wxCBAR_DOCKED_HORIZONTALLY, FALSE ); + + wasDocked = TRUE; + } + if ( mpCurPane ) { mpLayout->GetUpdatesManager().OnStartChanges(); @@ -641,16 +642,25 @@ void cbBarDragPlugin::OnMouseMove( cbMotionEvent& event ) wxCursor* pPrevCurs = mpCurCursor; if ( mpCurPane ) - - mpCurCursor = mpLayout->mpDragCursor; + { + mpCurCursor = mpLayout->mpNormalCursor; + } else { - if ( mpLayout->mFloatingOn && mpSrcPane->mProps.mRealTimeUpdatesOn ) + // if floating is off, and we are in the client + // area, the cursor will be invalid, otherwise + // it will be the normal cursor - mpCurCursor = mpLayout->mpDragCursor; + if (mpLayout->mFloatingOn) + { + mpCurCursor = mpLayout->mpNormalCursor; + } else + { mpCurCursor = mpLayout->mpNECursor; } + + } if ( pPrevCurs != mpCurCursor ) mpLayout->GetParentFrame().SetCursor( *mpCurCursor ); } @@ -687,9 +697,26 @@ void cbBarDragPlugin::OnLButtonUp( cbLeftUpEvent& event ) mpLayout->GetUpdatesManager().UpdateNow(); } else + { + if (mpDraggedBar->mState == wxCBAR_FLOATING) + { + mpLayout->SetBarState( mpDraggedBar, wxCBAR_DOCKED_HORIZONTALLY, TRUE); + } + mpLayout->RedockBar( mpDraggedBar, mHintRect, mpCurPane ); } } + else + { + if (mpDraggedBar->mState != wxCBAR_FLOATING) + { + mpLayout->SetBarState(mpDraggedBar, wxCBAR_FLOATING, true); + } + + mpDraggedBar->mDimInfo.mBounds[ wxCBAR_FLOATING ] = mHintRect; + mpLayout->ApplyBarProperties( mpDraggedBar ); + } + } mHintRect.width = -1; @@ -753,7 +780,7 @@ void cbBarDragPlugin::OnStartBarDragging( cbStartBarDraggingEvent& event ) mpLayout->CaptureEventsForPane( event.mpPane ); mpLayout->CaptureEventsForPlugin( this ); - mpLayout->GetParentFrame().SetCursor( *mpLayout->mpDragCursor ); + mpLayout->GetParentFrame().SetCursor( *mpLayout->mpNormalCursor ); mBarDragStarted = TRUE; diff --git a/contrib/src/fl/barhintspl.cpp b/contrib/src/fl/barhintspl.cpp index eb1f671685..241a98dea4 100644 --- a/contrib/src/fl/barhintspl.cpp +++ b/contrib/src/fl/barhintspl.cpp @@ -467,6 +467,11 @@ void cbBarHintsPlugin::OnLeftDown( cbLeftDownEvent& event ) { int i; for ( i = 0; i != BOXES_IN_HINT; ++i ) + { + mBoxes[i]->mPressed = FALSE; + mBoxes[i]->mWasClicked = FALSE; + } + for ( i = 0; i != BOXES_IN_HINT; ++i ) { mBoxes[i]->OnLeftDown( inFrame ); diff --git a/contrib/src/fl/toolwnd.cpp b/contrib/src/fl/toolwnd.cpp index a018ce3c5c..3f9824bf9f 100644 --- a/contrib/src/fl/toolwnd.cpp +++ b/contrib/src/fl/toolwnd.cpp @@ -571,6 +571,8 @@ void wxToolWindow::OnMotion( wxMouseEvent& event ) { DrawHintRect( mPrevHintRect ); DrawHintRect( finalRect ); + + ::wxLogTrace("%d,%d / %d,%d\n", finalRect.x, finalRect.y, finalRect.width, finalRect.height); } mPrevHintRect = finalRect;