commit 2b75cabb082f50497951e1015785ec066424fbd5
parent 7193af1ef4f4006c6d5954813349fe6bb50d55ce
Author: Dylan Araps <dylan.araps@gmail.com>
Date: Tue, 15 Oct 2019 13:50:43 +0300
docs: update
Diffstat:
M | sowm.c | | | 28 | ++++++++++++++++++++++++++++ |
1 file changed, 28 insertions(+), 0 deletions(-)
diff --git a/sowm.c b/sowm.c
@@ -232,6 +232,13 @@ void button_release() {
mouse.subwindow = None;
}
+/*
+ This function is called whenever a window is mapped to the
+ screen or moved to another desktop.
+
+ Memory is allocated for the new window and the current
+ desktop's window list is updated.
+*/
void win_add(Window w) {
client *c, *t;
@@ -256,6 +263,13 @@ void win_add(Window w) {
ws_save(ws);
}
+/*
+ This function is called whenever a window is destoyed
+ or moved to another desktop.
+
+ Memory is freed and the current desktop's window list
+ is updated.
+*/
void win_del(Window w) {
client *c;
@@ -285,6 +299,20 @@ void win_del(Window w) {
}
}
+/*
+ This function is called from a key binding to
+ close the currently focused window.
+
+ This differs from other window managers as we skip
+ the questions and go straight to the killing of
+ the window.
+
+ When I want to close a window I'm not asking, I
+ want the window closed and so it should immediately
+ close.
+
+ "Shoot first and don't ask questions later?.."
+*/
void win_kill() {
if (win_current() != root) XKillClient(d, cur);
}