summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-05-10 14:56:54 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-05-11 12:09:11 +0100
commitfac124afd23b23c648900d14c41881dc246f5e0e (patch)
tree8f4d59368e30751fadbb063510b0eb9cf04f8aa5 /vcl/source
parentab30f3367686f37c18a5c11e3621e29e37b11409 (diff)
make this cunning more explicit
Change-Id: Ie461646e076da4aa4b144c68e0e08c0424474ad8
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/window/menubarwindow.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx
index 4b72e0b5bbf9..ac84120c73de 100644
--- a/vcl/source/window/menubarwindow.cxx
+++ b/vcl/source/window/menubarwindow.cxx
@@ -1180,10 +1180,13 @@ bool MenuBarWindow::HandleMenuButtonEvent( sal_uInt16 i_nButtonId )
bool MenuBarWindow::CanGetFocus() const
{
- /* #i83908# do not use the menubar if it is native and invisible
+ /* #i83908# do not use the menubar if it is native or invisible
this relies on MenuBar::ImplCreate setting the height of the menubar
to 0 in this case
*/
+ SalMenu *pNativeMenu = pMenu ? pMenu->ImplGetSalMenu() : nullptr;
+ if (pNativeMenu && pNativeMenu->VisibleMenuBar())
+ return pNativeMenu->CanGetFocus();
return GetSizePixel().Height() > 0;
}