summaryrefslogtreecommitdiff
path: root/src/sxwm.c
diff options
context:
space:
mode:
authoruint23 <[email protected]>2025-04-26 00:49:25 +0100
committeruint23 <[email protected]>2025-04-26 00:49:25 +0100
commit710d2915c671a86cefac8da2589a1b93cd78b933 (patch)
treef343022f906939d18750394558166937e539ea5d /src/sxwm.c
parentfd7b18b3c20bc4e2685cd0d6ac14d4b87ba89cf2 (diff)
unmap window on exit + config stuff
Diffstat (limited to 'src/sxwm.c')
-rw-r--r--src/sxwm.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/sxwm.c b/src/sxwm.c
index 983326c..0e8cb8e 100644
--- a/src/sxwm.c
+++ b/src/sxwm.c
@@ -51,6 +51,7 @@ void hdl_map_req(XEvent *xev);
void hdl_motion(XEvent *xev);
void hdl_root_property(XEvent *xev);
void inc_gaps(void);
+void init_defaults(void);
void move_master_next(void);
void move_master_prev(void);
void move_to_workspace(uint ws);
@@ -94,6 +95,7 @@ Atom atom_net_workarea;
Cursor c_normal, c_move, c_resize;
Client *workspaces[NUM_WORKSPACES] = { NULL };
+Config default_config;
uint current_ws = 0;
DragMode drag_mode = DRAG_NONE;
Client *drag_client = NULL;
@@ -189,6 +191,8 @@ close_focused(void)
return;
}
+
+ XUnmapWindow(dpy, focused->win);
Atom *protos;
int n;
if (XGetWMProtocols(dpy, focused->win, &protos, &n) && protos) {
@@ -811,6 +815,19 @@ inc_gaps(void)
}
void
+init_defaults(void)
+{
+ default_config.gaps = 10;
+ default_config.border_width = 1;
+ default_config.border_foc_col = parse_col("#c0cbff");
+ default_config.border_ufoc_col = parse_col("#555555");
+ default_config.border_swap_col = parse_col("#fff4c0");
+ default_config.master_width = 50;
+ default_config.resize_master_amt = 5;
+ default_config.snap_distance = 5;
+}
+
+void
move_master_next(void)
{
if (!workspaces[current_ws] || !workspaces[current_ws]->next) {