[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - desktop/source

Marco Cecchetti marco.cecchetti at collabora.com
Wed Apr 11 17:18:02 UTC 2018


 desktop/source/lib/init.cxx |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 4a40e55e4d37f1f67ab38990f193ce29a3ebb4dc
Author: Marco Cecchetti <marco.cecchetti at collabora.com>
Date:   Sun Apr 8 12:12:27 2018 +0200

    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 at collabora.com>
    Tested-by: Jan Holesovsky <kendy at collabora.com>
    (cherry picked from commit 1cd76097043a5ece899dd7c9468755dcd961b0eb)
    Reviewed-on: https://gerrit.libreoffice.org/52737

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 9c337990aebe..47d4a0ad0ca8 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>
@@ -3419,10 +3420,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);
     }
 }
 


More information about the Libreoffice-commits mailing list