1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:47:45 +00:00

Close the MsgBox when clicking the OK button.

This feels vaguely crashy. I haven't tested window/widget destruction
before so there's sure to be bugs.
This commit is contained in:
Andreas Kling 2018-10-14 01:23:01 +02:00
parent 3ebea05996
commit 959a1b0750
9 changed files with 65 additions and 9 deletions

View file

@ -22,9 +22,11 @@ public:
const Rect& rect() const { return m_rect; }
void setRect(const Rect&);
void setRectWithoutRepaint(const Rect& rect) { m_rect = rect; }
Point position() const { return m_rect.location(); }
void setPosition(const Point& position) { setRect({ position.x(), position.y(), width(), height() }); }
void setPositionWithoutRepaint(const Point& position) { setRectWithoutRepaint({ position.x(), position.y(), width(), height() }); }
Widget* mainWidget() { return m_mainWidget; }
const Widget* mainWidget() const { return m_mainWidget; }
@ -44,6 +46,8 @@ public:
const Widget* focusedWidget() const { return m_focusedWidget.ptr(); }
void setFocusedWidget(Widget*);
bool isVisible() const;
void close();
private: