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.nakash...@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 <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@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); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits