Add a getter Window::deleted()

This commit is contained in:
Bertrand Songis
2020-06-26 16:02:18 +02:00
parent 5819dc0813
commit 729f538d67
3 changed files with 9 additions and 4 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ class ModalWindow: public Window
void deleteLater()
{
if (deleted)
if (_deleted)
return;
if (previousFocus) {
+2 -2
View File
@@ -69,7 +69,7 @@ void Window::detach()
void Window::deleteLater(bool detach)
{
if (deleted)
if (_deleted)
return;
TRACE_WINDOWS("Delete %p %s", this, getWindowDebugString().c_str());
@@ -89,7 +89,7 @@ void Window::deleteLater(bool detach)
trash.push_back(this);
deleted = true;
_deleted = true;
}
void Window::clear()
+6 -1
View File
@@ -342,6 +342,11 @@ class Window {
void detach();
bool deleted()
{
return _deleted;
}
protected:
Window * parent;
std::list<Window *> children;
@@ -354,7 +359,7 @@ class Window {
coord_t scrollPositionY = 0;
WindowFlags windowFlags;
LcdFlags textFlags;
bool deleted = false;
bool _deleted = false;
static Window * focusWindow;
static Window * slidingWindow;