1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-22 16:32:06 +00:00

GWindow: Make destroy-on-close an optional behavior.

Also add missing implementation of GWindow::is_visible().
This commit is contained in:
Andreas Kling 2019-06-22 10:37:03 +02:00
parent ae8eff55a7
commit e9cbda29e9
2 changed files with 7 additions and 2 deletions

View file

@ -53,6 +53,9 @@ public:
Color background_color() const { return m_background_color; }
void set_background_color(Color color) { m_background_color = color; }
bool should_destroy_on_close() { return m_destroy_on_close; }
void set_should_destroy_on_close(bool b) { m_destroy_on_close = b; }
int x() const { return rect().x(); }
int y() const { return rect().y(); }
int width() const { return rect().width(); }
@ -158,6 +161,7 @@ private:
GWindowType m_window_type { GWindowType::Normal };
bool m_is_active { false };
bool m_should_exit_app_on_close { false };
bool m_destroy_on_close { true };
bool m_has_alpha_channel { false };
bool m_double_buffering_enabled { true };
bool m_modal { false };