diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-02-05 10:31:37 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-02-05 10:31:37 +0100 |
commit | 11db8c1697533616020b5105afe490b99fd6d440 (patch) | |
tree | 29897b22c079c7ef7b09ab54726c56eb87e734f4 /WindowServer/WSWindowManager.h | |
parent | d0078b6574d7022f207f3af492d2d8ec142b9bd1 (diff) | |
download | serenity-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 'WindowServer/WSWindowManager.h')
-rw-r--r-- | WindowServer/WSWindowManager.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/WindowServer/WSWindowManager.h b/WindowServer/WSWindowManager.h index d55ea34791..dd3a7b17f3 100644 --- a/WindowServer/WSWindowManager.h +++ b/WindowServer/WSWindowManager.h @@ -48,6 +48,7 @@ private: void process_mouse_event(WSMouseEvent&); void handle_titlebar_mouse_event(WSWindow&, WSMouseEvent&); + void handle_close_button_mouse_event(WSWindow&, WSMouseEvent&); void set_active_window(WSWindow*); |