[MOS-296] Merge fix popup stack issues

Fix popup stack issues with Harmony
This commit is contained in:
Maciej Janicki
2022-03-09 12:47:07 +01:00
parent 6ad290366f
commit 24eff591b8
12 changed files with 63 additions and 35 deletions

View File

@@ -70,9 +70,6 @@ namespace app
auto ret = findInStack(window);
if (ret != stack.end()) {
stack.erase(std::next(ret), stack.end());
if (onPopCallback) {
onPopCallback(*this);
}
return true;
}
return false;
@@ -118,10 +115,7 @@ namespace app
{
return std::find_if(stack.begin(), stack.end(), [&](auto &el) { return el.name == window; });
}
void WindowsStack::registerOnPopCallback(std::function<void(WindowsStack &)> callback)
{
onPopCallback = std::move(callback);
}
void WindowsStack::dropPendingPopups()
{
auto it = stack.rbegin();