summaryrefslogtreecommitdiff
path: root/vcl/source/window/menubarwindow.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-08-05 14:57:59 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-08-05 17:37:18 +0200
commit3fbae5dc7e7b200776bbc8a7c2a43e1e04f15a2b (patch)
tree89066e6ed2d071697244f4641e05af8c0499fe47 /vcl/source/window/menubarwindow.cxx
parent746d95bb4067943679f0fe3b8bf91269debf519b (diff)
gtk is the only case auto-accel is true, and the menubar is native gtk there
so this special case handling can go now Change-Id: I98675b084fbef463d7ee4ee452eb57d1d4ff20c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120074 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source/window/menubarwindow.cxx')
-rw-r--r--vcl/source/window/menubarwindow.cxx30
1 files changed, 1 insertions, 29 deletions
diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx
index 09dd1d569edf..5879eed8926c 100644
--- a/vcl/source/window/menubarwindow.cxx
+++ b/vcl/source/window/menubarwindow.cxx
@@ -123,8 +123,6 @@ MenuBarWindow::MenuBarWindow( vcl::Window* pParent ) :
m_nRolloveredItem = ITEMPOS_INVALID;
mbAutoPopup = true;
m_bIgnoreFirstMove = true;
- SetMBWHideAccel(true);
- SetMBWMenuKey(false);
m_aCloseBtn->maImage = Image(StockImage::Yes, SV_RESID_BITMAP_CLOSEDOC);
@@ -390,7 +388,6 @@ void MenuBarWindow::PopupClosed( Menu const * pPopup )
void MenuBarWindow::MouseButtonDown( const MouseEvent& rMEvt )
{
mbAutoPopup = true;
- SetMBWMenuKey(false);
sal_uInt16 nEntry = ImplFindEntry( rMEvt.GetPosPixel() );
if ( ( nEntry != ITEMPOS_INVALID ) && !m_pActivePopup )
{
@@ -415,18 +412,7 @@ void MenuBarWindow::MouseMove( const MouseEvent& rMEvt )
if ( rMEvt.IsLeaveWindow() )
{
if ( m_nRolloveredItem != ITEMPOS_INVALID && m_nRolloveredItem != m_nHighlightedItem )
- {
- // there is a spurious MouseMove generated after a menu is launched from the keyboard, hence this...
- if (m_nHighlightedItem != ITEMPOS_INVALID)
- {
- bool hide = GetMBWHideAccel();
- SetMBWHideAccel(true);
- Invalidate(); //HighlightItem( nRolloveredItem, false );
- SetMBWHideAccel(hide);
- }
- else
- Invalidate(); //HighlightItem( nRolloveredItem, false );
- }
+ Invalidate(); //HighlightItem( nRolloveredItem, false );
m_nRolloveredItem = ITEMPOS_INVALID;
return;
@@ -463,9 +449,6 @@ void MenuBarWindow::ChangeHighlightItem( sal_uInt16 n, bool bSelectEntry, bool b
if( ! m_pMenu )
return;
- // always hide accelerators when updating the menu bar...
- SetMBWHideAccel(true);
-
// #57934# close active popup if applicable, as TH's background storage works.
MenuItemData* pNextData = m_pMenu->pItemList->GetDataFromPos( n );
if ( m_pActivePopup && m_pActivePopup->ImplGetWindow() && ( !pNextData || ( m_pActivePopup != pNextData->pSubMenu ) ) )
@@ -849,8 +832,6 @@ bool MenuBarWindow::HandleKeyEvent( const KeyEvent& rKEvent, bool bFromMenu )
}
}
- bool autoacc = ImplGetSVData()->maNWFData.mbAutoAccel;
-
if ( !bDone && ( bFromMenu || rKEvent.GetKeyCode().IsMod2() ) )
{
sal_Unicode nCharCode = rKEvent.GetCharCode();
@@ -867,15 +848,6 @@ bool MenuBarWindow::HandleKeyEvent( const KeyEvent& rKEvent, bool bFromMenu )
}
}
- const bool bShowAccels = nCode != KEY_ESCAPE;
- if (GetMBWMenuKey() != bShowAccels)
- {
- SetMBWMenuKey(bShowAccels);
- SetMBWHideAccel(!bShowAccels);
- if (autoacc)
- Invalidate(InvalidateFlags::Update);
- }
-
return bDone;
}