[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.0' - desktop/inc desktop/qa

Ashod Nakashian ashod.nakashian at collabora.co.uk
Sat Apr 23 18:10:54 UTC 2016


 desktop/inc/lib/init.hxx                    |    1 +
 desktop/qa/desktop_lib/test_desktop_lib.cxx |   13 +++++++++----
 2 files changed, 10 insertions(+), 4 deletions(-)

New commits:
commit 7c01cf652850a8b8d3fd5ef6eb0a12ca6e725943
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date:   Sat Apr 23 10:23:48 2016 -0400

    Desktop compresses mouse pointer notifications
    
    Change-Id: Id76f4e2952c4c551b626d094c11eb3339d76e50c
    Reviewed-on: https://gerrit.libreoffice.org/24319
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>

diff --git a/desktop/inc/lib/init.hxx b/desktop/inc/lib/init.hxx
index a176854..fdcb54f 100644
--- a/desktop/inc/lib/init.hxx
+++ b/desktop/inc/lib/init.hxx
@@ -42,6 +42,7 @@ namespace desktop {
             m_states.emplace(LOK_CALLBACK_TEXT_SELECTION, "NIL");
             m_states.emplace(LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR, "NIL");
             m_states.emplace(LOK_CALLBACK_STATE_CHANGED, "NIL");
+            m_states.emplace(LOK_CALLBACK_MOUSE_POINTER, "NIL");
 
             Start();
         }
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 1ad168f..b9d5969 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -697,12 +697,14 @@ void DesktopLOKTest::testNotificationCompression()
     handler->queue(LOK_CALLBACK_STATE_CHANGED, ""); // 4
     handler->queue(LOK_CALLBACK_STATE_CHANGED, ".uno:Bold"); // 5
     handler->queue(LOK_CALLBACK_STATE_CHANGED, ""); // 6
-    handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "15 25 15 10"); // 7
+    handler->queue(LOK_CALLBACK_MOUSE_POINTER, "text"); // 7
+    handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "15 25 15 10"); // 8
     handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "15 25 15 10"); // Should be dropped.
+    handler->queue(LOK_CALLBACK_MOUSE_POINTER, "text"); // Should be dropped.
 
     flushTimers();
 
-    CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(8), notifs.size());
+    CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(9), notifs.size());
 
     CPPUNIT_ASSERT_EQUAL((int)LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR, (int)std::get<0>(notifs[0]));
     CPPUNIT_ASSERT_EQUAL(std::string(""), std::get<1>(notifs[0]));
@@ -725,8 +727,11 @@ void DesktopLOKTest::testNotificationCompression()
     CPPUNIT_ASSERT_EQUAL((int)LOK_CALLBACK_STATE_CHANGED, (int)std::get<0>(notifs[6]));
     CPPUNIT_ASSERT_EQUAL(std::string(""), std::get<1>(notifs[6]));
 
-    CPPUNIT_ASSERT_EQUAL((int)LOK_CALLBACK_INVALIDATE_TILES, (int)std::get<0>(notifs[7]));
-    CPPUNIT_ASSERT_EQUAL(std::string("15 25 15 10"), std::get<1>(notifs[7]));
+    CPPUNIT_ASSERT_EQUAL((int)LOK_CALLBACK_MOUSE_POINTER, (int)std::get<0>(notifs[7]));
+    CPPUNIT_ASSERT_EQUAL(std::string("text"), std::get<1>(notifs[7]));
+
+    CPPUNIT_ASSERT_EQUAL((int)LOK_CALLBACK_INVALIDATE_TILES, (int)std::get<0>(notifs[8]));
+    CPPUNIT_ASSERT_EQUAL(std::string("15 25 15 10"), std::get<1>(notifs[8]));
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(DesktopLOKTest);


More information about the Libreoffice-commits mailing list