summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorMarco Cecchetti <marco.cecchetti@collabora.com>2018-04-08 12:12:27 +0200
committerJan Holesovsky <kendy@collabora.com>2018-04-12 19:51:45 +0200
commit2977e8d7c2a0bf62fa70a728a88cc6bddfc87ffd (patch)
treeba2bb4d6445ec5eaa1b1c2cc1f4b22a222482be3 /desktop
parenteb5f7302d0b2d63e82a9b3f3c5429278e2b54c85 (diff)
lok: sc: clicking outside a pop-up or context menu doesn't close it
Change-Id: Iecf0659467264d921c7c9faddc98fd5519e7db93 Reviewed-on: https://gerrit.libreoffice.org/52617 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit 1cd76097043a5ece899dd7c9468755dcd961b0eb) Reviewed-on: https://gerrit.libreoffice.org/52736 Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/lib/init.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 28feff959221..6e4d1cff8556 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -80,6 +80,7 @@
#include <tools/fract.hxx>
#include <svtools/ctrltool.hxx>
#include <svtools/langtab.hxx>
+#include <vcl/floatwin.hxx>
#include <vcl/fontcharmap.hxx>
#include <vcl/graphicfilter.hxx>
#include <vcl/ptrstyle.hxx>
@@ -3437,10 +3438,12 @@ static void doc_postWindow(LibreOfficeKitDocument* /*pThis*/, unsigned nLOKWindo
return;
}
- if (Dialog* pDialog = dynamic_cast<Dialog*>(pWindow.get()))
+ if (nAction == LOK_WINDOW_CLOSE)
{
- if (nAction == LOK_WINDOW_CLOSE)
+ if (Dialog* pDialog = dynamic_cast<Dialog*>(pWindow.get()))
pDialog->Close();
+ else if (FloatingWindow* pFloatWin = dynamic_cast<FloatingWindow*>(pWindow.get()))
+ pFloatWin->EndPopupMode(FloatWinPopupEndFlags::Cancel | FloatWinPopupEndFlags::CloseAll);
}
}