summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorStephan Schäfer <ssa@openoffice.org>2002-12-10 15:22:15 +0000
committerStephan Schäfer <ssa@openoffice.org>2002-12-10 15:22:15 +0000
commit75960b386f740aa152477e132b05d67a1f296140 (patch)
treeb1522dedd2f70298a760fac2b3d2de7de31d9b6f /vcl
parent12851e106ee98979c344a011f423f45dbd739dbe (diff)
#105920# avoid focustodocument if not really required
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/menu.cxx13
1 files changed, 6 insertions, 7 deletions
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 4bf86ce2664b..1280ebda69c8 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: menu.cxx,v $
*
- * $Revision: 1.87 $
+ * $Revision: 1.88 $
*
- * last change: $Author: cd $ $Date: 2002-11-29 13:34:25 $
+ * last change: $Author: ssa $ $Date: 2002-12-10 16:22:15 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -201,7 +201,6 @@ inline BOOL ImplIsMouseFollow()
return ( Application::GetSettings().GetMouseSettings().GetFollow() & MOUSE_FOLLOW_MENU ) ? TRUE : FALSE;
}
-
struct MenuItemData
{
USHORT nId; // SV Id
@@ -585,7 +584,7 @@ private:
PushButton aHideBtn;
void HighlightItem( USHORT nPos, BOOL bHighlight );
- void ChangeHighlightItem( USHORT n, BOOL bSelectPopupEntry, BOOL bAllowRestoreFocus = TRUE );
+ void ChangeHighlightItem( USHORT n, BOOL bSelectPopupEntry, BOOL bAllowRestoreFocus = TRUE, BOOL bDefaultToDocument = TRUE );
USHORT ImplFindEntry( const Point& rMousePos ) const;
void ImplCreatePopup( BOOL bPreSelectFirst );
@@ -4236,7 +4235,7 @@ void MenuBarWindow::PopupClosed( Menu* pPopup )
if ( pPopup == pActivePopup )
{
KillActivePopup();
- ChangeHighlightItem( ITEMPOS_INVALID, FALSE, ImplGetFrameWindow()->ImplGetFrameData()->mbHasFocus );
+ ChangeHighlightItem( ITEMPOS_INVALID, FALSE, ImplGetFrameWindow()->ImplGetFrameData()->mbHasFocus, FALSE );
}
}
@@ -4277,7 +4276,7 @@ void MenuBarWindow::MouseMove( const MouseEvent& rMEvt )
ChangeHighlightItem( nEntry, FALSE );
}
-void MenuBarWindow::ChangeHighlightItem( USHORT n, BOOL bSelectEntry, BOOL bAllowRestoreFocus )
+void MenuBarWindow::ChangeHighlightItem( USHORT n, BOOL bSelectEntry, BOOL bAllowRestoreFocus, BOOL bDefaultToDocument)
{
// #57934# ggf. das aktive Popup sofort schliessen, damit TH's Hintergrundsicherung funktioniert.
MenuItemData* pNextData = pMenu->pItemList->GetDataFromPos( n );
@@ -4332,7 +4331,7 @@ void MenuBarWindow::ChangeHighlightItem( USHORT n, BOOL bSelectEntry, BOOL bAllo
nSaveFocusId = 0;
Window::EndSaveFocus( nTempFocusId, bAllowRestoreFocus );
// #105406# restore focus to document if we could not save focus before
- if( !nTempFocusId && bAllowRestoreFocus )
+ if( bDefaultToDocument && !nTempFocusId && bAllowRestoreFocus )
GrabFocusToDocument();
}
}