[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3-0' - kit/ChildSession.cpp

Pranav Kant pranavk at collabora.co.uk
Tue Dec 5 11:09:34 UTC 2017


 kit/ChildSession.cpp |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 7bffafd37d134f3f13f69cc5f959b419dc54337f
Author: Pranav Kant <pranavk at collabora.co.uk>
Date:   Tue Dec 5 02:39:26 2017 +0530

    lokdialog: Set view id before posting to LOK dialog api
    
    Change-Id: I53925a71718f1acfc2337f86f97f4f5526546383
    (cherry picked from commit a5d4c3bb90df48330c32142e8c235d23be089802)
    Reviewed-on: https://gerrit.libreoffice.org/45847
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>
    Tested-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp
index 4a804aac..326dabcd 100644
--- a/kit/ChildSession.cpp
+++ b/kit/ChildSession.cpp
@@ -810,11 +810,9 @@ bool ChildSession::keyEvent(const char* /*buffer*/, int /*length*/,
     }
 
     std::unique_lock<std::mutex> lock(_docManager.getDocumentMutex());
+    getLOKitDocument()->setView(_viewId);
     if (target == LokEventTargetEnum::Document)
-    {
-        getLOKitDocument()->setView(_viewId);
         getLOKitDocument()->postKeyEvent(type, charcode, keycode);
-    }
     else if (winId != 0)
         getLOKitDocument()->postWindowKeyEvent(winId, type, charcode, keycode);
 
@@ -876,10 +874,10 @@ bool ChildSession::mouseEvent(const char* /*buffer*/, int /*length*/,
 
     std::unique_lock<std::mutex> lock(_docManager.getDocumentMutex());
 
+    getLOKitDocument()->setView(_viewId);
     switch (target)
     {
     case LokEventTargetEnum::Document:
-        getLOKitDocument()->setView(_viewId);
         getLOKitDocument()->postMouseEvent(type, x, y, count, buttons, modifier);
         break;
     case LokEventTargetEnum::Window:
@@ -1026,6 +1024,8 @@ bool ChildSession::sendWindowCommand(const char* /*buffer*/, int /*length*/, con
         reader >> winId;
     }
 
+    getLOKitDocument()->setView(_viewId);
+
     if (tokens.size() > 2 && tokens[2] == "close")
         getLOKitDocument()->postWindow(winId, LOK_WINDOW_CLOSE);
 


More information about the Libreoffice-commits mailing list