vcl/source/window/menu.cxx | 7 +++++++ 1 file changed, 7 insertions(+)
New commits: commit 15bcdc15a803b54dc17733b0f60556fa0cbf799b Author: Samuel Mehrbrodt <[email protected]> AuthorDate: Wed Mar 11 12:41:58 2020 +0100 Commit: Miklos Vajna <[email protected]> CommitDate: Mon Apr 6 10:50:45 2020 +0200 Add some fallback minimum size when screen size detection goes wrong (cherry picked from commit 643a1492bd648fbd803ca86aca600cc2bdaf5819) Change-Id: I97ec2359b8ae406e310a5d043ac068ddd89b3fd1 diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index ead4e91eff10..411b26bac9d5 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -2885,6 +2885,13 @@ sal_uInt16 PopupMenu::ImplExecute( const VclPtr<vcl::Window>& pW, const tools::R nMaxHeight = std::min(nMaxHeight, std::max(nHeightAbove, nHeightBelow)); } + // In certain cases this might be misdetected with a height of 0, leading to menus not being displayed. + // So assume that the available screen size matches at least the system requirements + SAL_WARN_IF(nMaxHeight < 768, "vcl", + "Available height misdetected as " << nMaxHeight + << "px. Setting to 768px instead."); + nMaxHeight = std::max(nMaxHeight, 768l); + if (pStartedFrom && pStartedFrom->IsMenuBar()) nMaxHeight -= pW->GetSizePixel().Height(); sal_Int32 nLeft, nTop, nRight, nBottom; _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
