From 75d54200104f48db963742d161489790b5a1d15e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Wed, 9 Mar 2016 11:03:27 +0000 Subject: [PATCH] Resolves: rhbz#1315385 use preferred size if widget supports it --- ...15385-use-preferred-size-if-widget-s.patch | 30 +++++++++++++++++++ libreoffice.spec | 1 + 2 files changed, 31 insertions(+) create mode 100644 0001-Resolves-rhbz-1315385-use-preferred-size-if-widget-s.patch diff --git a/0001-Resolves-rhbz-1315385-use-preferred-size-if-widget-s.patch b/0001-Resolves-rhbz-1315385-use-preferred-size-if-widget-s.patch new file mode 100644 index 0000000..747ef70 --- /dev/null +++ b/0001-Resolves-rhbz-1315385-use-preferred-size-if-widget-s.patch @@ -0,0 +1,30 @@ +From 86692366b7edbd6dd1ce329a172fb78d402ac328 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Wed, 9 Mar 2016 11:01:43 +0000 +Subject: [PATCH] Resolves: rhbz#1315385 use preferred size if widget supports + it + +when deciding if a popup needs to be placed up or down to stay +visible on screen + +Change-Id: I718e0ee4a79152e919ac95841e15d4b53764ac78 +--- + vcl/source/window/floatwin.cxx | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx +index 00c3b34..6553f94 100644 +--- a/vcl/source/window/floatwin.cxx ++++ b/vcl/source/window/floatwin.cxx +@@ -244,7 +244,7 @@ Point FloatingWindow::ImplCalcPos( vcl::Window* pWindow, + { + // get window position + Point aPos; +- Size aSize = pWindow->GetSizePixel(); ++ Size aSize = ::isLayoutEnabled(pWindow) ? pWindow->get_preferred_size() : pWindow->GetSizePixel(); + Rectangle aScreenRect = pWindow->ImplGetFrameWindow()->GetDesktopRectPixel(); + FloatingWindow *pFloatingWindow = dynamic_cast( pWindow ); + +-- +2.7.1 + diff --git a/libreoffice.spec b/libreoffice.spec index efec207..fd9cc64 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -263,6 +263,7 @@ Patch28: 0005-gtk3-handle-items-without-commands.patch Patch29: 0006-mark-checkable-toolbox-menu-entries-as-checkable.patch Patch30: 0007-set-gtk-layout-direction-to-match-ours.patch Patch31: 0008-gtk3-implement-native-context-menus.patch +Patch32: 0001-Resolves-rhbz-1315385-use-preferred-size-if-widget-s.patch %if 0%{?rhel} # not upstreamed