summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-02-05 10:31:37 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-02-05 10:31:37 +0100
commit11db8c1697533616020b5105afe490b99fd6d440 (patch)
tree29897b22c079c7ef7b09ab54726c56eb87e734f4 /Kernel
parentd0078b6574d7022f207f3af492d2d8ec142b9bd1 (diff)
downloadserenity-11db8c1697533616020b5105afe490b99fd6d440.zip
Add a simple close button ("X") to windows.
Clicking the button generates a WindowCloseRequest event which the client app then has to deal with. The default behavior for GWindow is to close() itself. I also added a flag, GWindow::should_exit_event_loop_on_close() which does what it sounds like it does. This patch exposed some bugs in GWindow and GWidget teardown.
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/GUITypes.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Kernel/GUITypes.h b/Kernel/GUITypes.h
index 9059ed96e4..61aa6587eb 100644
--- a/Kernel/GUITypes.h
+++ b/Kernel/GUITypes.h
@@ -66,6 +66,7 @@ struct GUI_Event {
KeyUp,
WindowActivated,
WindowDeactivated,
+ WindowCloseRequest,
};
Type type { Invalid };
int window_id { -1 };