mirror of
https://github.com/clangen/musikcube.git
synced 2025-01-01 09:01:15 +00:00
Ensure the OverlayStack is cleared when the app loop finishes.
This commit is contained in:
parent
2a819eb0ad
commit
7e60827aab
@ -230,6 +230,8 @@ void App::Run(ILayoutPtr layout) {
|
||||
|
||||
MessageQueue::Instance().Dispatch();
|
||||
}
|
||||
|
||||
overlays.Clear();
|
||||
}
|
||||
|
||||
void App::UpdateFocusedWindow(IWindowPtr window) {
|
||||
|
@ -93,4 +93,8 @@ void OverlayStack::Remove(ILayout* layout) {
|
||||
setOverlayStack(*it, nullptr);
|
||||
this->stack.erase(it);
|
||||
}
|
||||
}
|
||||
|
||||
void OverlayStack::Clear() {
|
||||
this->stack.clear();
|
||||
}
|
@ -46,6 +46,10 @@ namespace cursespp {
|
||||
void Remove(ILayoutPtr layout);
|
||||
void Remove(ILayout* layout);
|
||||
|
||||
protected:
|
||||
friend class App;
|
||||
void Clear(); /* don't want this exposed to the public */
|
||||
|
||||
private:
|
||||
std::vector<ILayoutPtr> stack;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user