542 // Update MW Indicator |
542 // Update MW Indicator |
543 else if ( WindowCount() == 2 ) |
543 else if ( WindowCount() == 2 ) |
544 { |
544 { |
545 // sets the window status |
545 // sets the window status |
546 windowQue->iStatus |= CBrowserWindowQue::EWindowDeleted; |
546 windowQue->iStatus |= CBrowserWindowQue::EWindowDeleted; |
|
547 windowQue->iWindow->BrCtlInterface().HandleCommandL((TInt)TBrCtlDefs::ECommandNotifyPluginFocusChangeEvent + (TInt)TBrCtlDefs::ECommandIdBase); |
547 windowQue->iWindow->DeactivateL(); |
548 windowQue->iWindow->DeactivateL(); |
548 // maintain deleted windows' count |
549 // maintain deleted windows' count |
549 ++iDeletedWindowCount; |
550 ++iDeletedWindowCount; |
550 |
551 |
551 if( aUserInitiated ) |
552 if( aUserInitiated ) |
555 } |
556 } |
556 else |
557 else |
557 { |
558 { |
558 // sets the window status |
559 // sets the window status |
559 windowQue->iStatus |= CBrowserWindowQue::EWindowDeleted; |
560 windowQue->iStatus |= CBrowserWindowQue::EWindowDeleted; |
|
561 windowQue->iWindow->BrCtlInterface().HandleCommandL((TInt)TBrCtlDefs::ECommandNotifyPluginFocusChangeEvent + (TInt)TBrCtlDefs::ECommandIdBase); |
560 windowQue->iWindow->DeactivateL(); |
562 windowQue->iWindow->DeactivateL(); |
561 // maintain deleted windows' count |
563 // maintain deleted windows' count |
562 ++iDeletedWindowCount; |
564 ++iDeletedWindowCount; |
563 |
565 |
564 if( aUserInitiated ) |
566 if( aUserInitiated ) |
587 { |
589 { |
588 BROWSER_LOG( ( _L( "Switching..." ) ) ); |
590 BROWSER_LOG( ( _L( "Switching..." ) ) ); |
589 if( windowQue != iCurrentWindow ) |
591 if( windowQue != iCurrentWindow ) |
590 { |
592 { |
591 wdnSwitching = ETrue; |
593 wdnSwitching = ETrue; |
|
594 iCurrentWindow->iWindow->BrCtlInterface().HandleCommandL((TInt)TBrCtlDefs::ECommandNotifyPluginFocusChangeEvent + (TInt)TBrCtlDefs::ECommandIdBase); |
592 iCurrentWindow->iWindow->DeactivateL(); |
595 iCurrentWindow->iWindow->DeactivateL(); |
593 iCurrentWindow = windowQue; |
596 iCurrentWindow = windowQue; |
594 } |
597 } |
595 //If the history view is up, don't activate the content view unless it is switching the window. Otherwise, |
598 //If the history view is up, don't activate the content view unless it is switching the window. Otherwise, |
596 //it will overdraw the history view and it will cause serious problems when there |
599 //it will overdraw the history view and it will cause serious problems when there |
597 //is a background redirection |
600 //is a background redirection |
598 if(!iCurrentWindow->iWindow->IsWindowActive() && (!iContentView->IsHistoryViewUp() || wdnSwitching)) |
601 if(!iCurrentWindow->iWindow->IsWindowActive() && (!iContentView->IsHistoryViewUp() || wdnSwitching)) |
599 { |
602 { |
|
603 iCurrentWindow->iWindow->BrCtlInterface().HandleCommandL((TInt)TBrCtlDefs::ECommandNotifyPluginFocusChangeEvent + (TInt)TBrCtlDefs::ECommandIdBase); |
600 iCurrentWindow->iWindow->ActivateL( aDraw ); |
604 iCurrentWindow->iWindow->ActivateL( aDraw ); |
601 iContentView->UpdateCbaL(); |
605 iContentView->UpdateCbaL(); |
602 } |
606 } |
603 } |
607 } |
604 return error; |
608 return error; |