diff --git a/services/state/include/touchpad_event_fragment.h b/services/state/include/touchpad_event_fragment.h index fdae11c..69d6e25 100644 --- a/services/state/include/touchpad_event_fragment.h +++ b/services/state/include/touchpad_event_fragment.h @@ -13,6 +13,9 @@ * limitations under the License. */ +#ifndef DISTRIBUTED_INPUT_TOUCHPAD_EVENT_FRAGMENT_H +#define DISTRIBUTED_INPUT_TOUCHPAD_EVENT_FRAGMENT_H + #include #include @@ -35,4 +38,5 @@ private: }; } // namespace DistributedInput } // namespace DistributedHardware -} // namespace OHOS \ No newline at end of file +} // namespace OHOS +#endif // DISTRIBUTED_INPUT_TOUCHPAD_EVENT_FRAGMENT_H \ No newline at end of file diff --git a/services/state/include/touchpad_event_fragment_mgr.h b/services/state/include/touchpad_event_fragment_mgr.h index 3bce00e..a406421 100644 --- a/services/state/include/touchpad_event_fragment_mgr.h +++ b/services/state/include/touchpad_event_fragment_mgr.h @@ -13,6 +13,9 @@ * limitations under the License. */ +#ifndef DISTRIBUTED_INPUT_TOUCHPAD_EVENT_FRAGMENT_MGR_H +#define DISTRIBUTED_INPUT_TOUCHPAD_EVENT_FRAGMENT_MGR_H + #include "touchpad_event_fragment.h" #include @@ -54,4 +57,5 @@ private: }; } // namespace DistributedInput } // namespace DistributedHardware -} // namespace OHOS \ No newline at end of file +} // namespace OHOS +#endif // DISTRIBUTED_INPUT_TOUCHPAD_EVENT_FRAGMENT_MGR_H \ No newline at end of file diff --git a/services/state/src/dinput_sink_state.cpp b/services/state/src/dinput_sink_state.cpp index 345a681..5311a2b 100644 --- a/services/state/src/dinput_sink_state.cpp +++ b/services/state/src/dinput_sink_state.cpp @@ -149,7 +149,8 @@ void DInputSinkState::SimulateKeyDownEvents(const int32_t sessionId, const std:: keyDownStateMap_.erase(dhId); } -void DInputSinkState::SimulateKeyDownEvent(const int32_t sessionId, const std::string &dhId, const struct RawEvent &event) +void DInputSinkState::SimulateKeyDownEvent(const int32_t sessionId, const std::string &dhId, + const struct RawEvent &event) { DistributedInputSinkTransport::GetInstance().SendKeyStateNodeMsg(sessionId, dhId, EV_KEY, event.code, KEY_DOWN_STATE); diff --git a/services/state/src/touchpad_event_fragment_mgr.cpp b/services/state/src/touchpad_event_fragment_mgr.cpp index b1726fc..64a4e09 100644 --- a/services/state/src/touchpad_event_fragment_mgr.cpp +++ b/services/state/src/touchpad_event_fragment_mgr.cpp @@ -42,7 +42,8 @@ bool TouchPadEventFragmentMgr::IsWholeTouchFragments(const std::vector> TouchPadEventFragmentMgr::PushEvent(const std::string &dhId, const RawEvent &event) +std::pair> TouchPadEventFragmentMgr::PushEvent(const std::string &dhId, + const RawEvent &event) { if (IsPositionEvent(event)) { return {false, {}};