#include "UniversalSwitch.hpp"
#include "UniversalSwitchLog.hpp"
#include "Window.hpp"
+#include "utils.hpp"
#include <Elementary.h>
}
Sound::playSoundFeedback(Sound::ID::NAVIGATION_ITERATED);
}
+
+ static const std::string BACK_BUTTON_CODE = "XF86Back";
}
class RowScannerImpl : public ScreenScanner
{
bool continueScanning = false;
if (possibleMoveUpInHierarchy) {
- possibleMoveUpInHierarchy = false;
DEBUG("execute move up in hierarchy");
+ possibleMoveUpInHierarchy = false;
continueScanning = true;
stopScanning();
- if (state == State::ITEMS)
+ switch (state) {
+ case State::ITEMS:
state = State::START;
- else if (state == State::END)
+ break;
+ case State::END:
state = State::ROWS;
- else
+ break;
+ case State::ROWS:
+ DEBUG("Escape UI");
+ state = State::START;
+ utils::EventGenerator::generateKeyPress(BACK_BUTTON_CODE);
+ return;
+ default:
ASSERT(0, "Should not be reached");
+ }
}
switch (state) {