diff options
author | 2020-07-24 16:22:36 +0000 | |
---|---|---|
committer | 2020-07-24 16:22:36 +0000 | |
commit | 1bd1fcfd858a463c507c35fb99255487f745101d (patch) | |
tree | ad941d534864481384b81875873fa56476d32dbb /libs/gui/LayerState.cpp | |
parent | 2fc6b5f4fecf362701eedac2fcabe0fcd50407b5 (diff) | |
parent | e798b47821d07191a20bdb7a3a1fc3887b661635 (diff) |
Merge "Add setFocusedWindow function stub"
Diffstat (limited to 'libs/gui/LayerState.cpp')
-rw-r--r-- | libs/gui/LayerState.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/libs/gui/LayerState.cpp b/libs/gui/LayerState.cpp index 1030b82f14..117ce58719 100644 --- a/libs/gui/LayerState.cpp +++ b/libs/gui/LayerState.cpp @@ -448,19 +448,36 @@ void layer_state_t::merge(const layer_state_t& other) { // ------------------------------- InputWindowCommands ---------------------------------------- -void InputWindowCommands::merge(const InputWindowCommands& other) { +bool InputWindowCommands::merge(const InputWindowCommands& other) { + bool changes = false; +#ifndef NO_INPUT + changes |= !other.focusRequests.empty(); + focusRequests.insert(focusRequests.end(), std::make_move_iterator(other.focusRequests.begin()), + std::make_move_iterator(other.focusRequests.end())); +#endif + changes |= other.syncInputWindows && !syncInputWindows; syncInputWindows |= other.syncInputWindows; + return changes; } void InputWindowCommands::clear() { +#ifndef NO_INPUT + focusRequests.clear(); +#endif syncInputWindows = false; } void InputWindowCommands::write(Parcel& output) const { +#ifndef NO_INPUT + output.writeParcelableVector(focusRequests); +#endif output.writeBool(syncInputWindows); } void InputWindowCommands::read(const Parcel& input) { +#ifndef NO_INPUT + input.readParcelableVector(&focusRequests); +#endif syncInputWindows = input.readBool(); } |