Remove touch() return values from screen hierarchy

This commit is contained in:
Henrik Rydgård committed 2023-01-10 10:12:37 +01:00
1 parent fdfc4cbe40
commit a3a949f5e6
10 files changed
+18 -28

No files matched your search

+3 -5
View File
@@ -75,20 +75,18 @@ void ScreenManager::switchToNext() {
nextStack_.clear();
}
bool ScreenManager::touch(const TouchInput &touch) {
void ScreenManager::touch(const TouchInput &touch) {
std::lock_guard<std::recursive_mutex> guard(inputLock_);
bool result = false;
// Send release all events to every screen layer.
if (touch.flags & TOUCH_RELEASE_ALL) {
for (auto &layer : stack_) {
Screen *screen = layer.screen;
result = layer.screen->touch(screen->transformTouch(touch));
layer.screen->touch(screen->transformTouch(touch));
}
} else if (!stack_.empty()) {
Screen *screen = stack_.back().screen;
result = stack_.back().screen->touch(screen->transformTouch(touch));
stack_.back().screen->touch(screen->transformTouch(touch));
}
return result;
}
bool ScreenManager::key(const KeyInput &key) {