diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2016-04-23 10:23:48 -0400 |
---|---|---|
committer | Ashod Nakashian <ashnakash@gmail.com> | 2016-05-08 17:43:01 +0000 |
commit | dc464bdb08cf6a3a3b118245b6eecbda5e94fb42 (patch) | |
tree | da4ea4986f5ce29bdb23687c24fe00eba24e0f79 | |
parent | de34052e31c6cb6caefe89e52dee3039eb3fbacb (diff) |
Desktop compresses mouse pointer notifications
Change-Id: Id76f4e2952c4c551b626d094c11eb3339d76e50c
Reviewed-on: https://gerrit.libreoffice.org/24319
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
(cherry picked from commit 7c01cf652850a8b8d3fd5ef6eb0a12ca6e725943)
Reviewed-on: https://gerrit.libreoffice.org/24379
Tested-by: Jenkins <ci@libreoffice.org>
-rw-r--r-- | desktop/inc/lib/init.hxx | 1 | ||||
-rw-r--r-- | desktop/qa/desktop_lib/test_desktop_lib.cxx | 13 |
2 files changed, 10 insertions, 4 deletions
diff --git a/desktop/inc/lib/init.hxx b/desktop/inc/lib/init.hxx index b8878076b7f5..df065d767dca 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 46dde9ff6d99..f6e3d91632e4 100644 --- a/desktop/qa/desktop_lib/test_desktop_lib.cxx +++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx @@ -1285,12 +1285,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. Scheduler::ProcessEventsToIdle(); - 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])); @@ -1313,8 +1315,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); |