diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2016-04-23 10:23:48 -0400 |
---|---|---|
committer | Ashod Nakashian <ashnakash@gmail.com> | 2016-04-23 18:10:31 +0000 |
commit | 7c01cf652850a8b8d3fd5ef6eb0a12ca6e725943 (patch) | |
tree | b00b9478101fff3214f7798d91d8c0f92a3119a6 /desktop | |
parent | 41a5531afb740f7af01309ac061838c37c6c3fb1 (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>
Diffstat (limited to 'desktop')
-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 a17685490b2f..fdcb54fd264b 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 1ad168f99f86..b9d59692d084 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); |