aboutsummaryrefslogtreecommitdiffstats
path: root/sway/container.c
diff options
context:
space:
mode:
authorLibravatar Mikkel Oscar Lyderik <mikkeloscar@gmail.com>2015-12-29 13:00:35 +0100
committerLibravatar Mikkel Oscar Lyderik <mikkeloscar@gmail.com>2015-12-29 13:03:53 +0100
commit16b8c2e915fb7972ad5190ae2591b2d71789f477 (patch)
tree3474e5a04ec25468b0a26112796d8b5a4e0f6021 /sway/container.c
parenthandlers: geometry_request: Better debug output. (diff)
downloadsway-16b8c2e915fb7972ad5190ae2591b2d71789f477.tar.gz
sway-16b8c2e915fb7972ad5190ae2591b2d71789f477.tar.zst
sway-16b8c2e915fb7972ad5190ae2591b2d71789f477.zip
Handle SIGTERM sent to sway
This makes sway handle and gracefully shut down everything when receiving a SIGTERM. Fix #416
Diffstat (limited to 'sway/container.c')
-rw-r--r--sway/container.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sway/container.c b/sway/container.c
index e6fa4f37..dcf4dcc8 100644
--- a/sway/container.c
+++ b/sway/container.c
@@ -796,3 +796,13 @@ void add_gaps(swayc_t *view, void *_data) {
796 } 796 }
797 } 797 }
798} 798}
799
800static void close_view(swayc_t *container, void *data) {
801 if (container->type == C_VIEW) {
802 wlc_view_close(container->handle);
803 }
804}
805
806void close_views(swayc_t *container) {
807 container_map(container, close_view, NULL);
808}